Changeset View
Changeset View
Standalone View
Standalone View
services/identity/src/service.rs
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | use proto::{ | ||||
registration_response::Data::PakeLoginResponse as PakeRegistrationLoginResponse, | registration_response::Data::PakeLoginResponse as PakeRegistrationLoginResponse, | ||||
registration_response::Data::PakeRegistrationResponse, CompareUsersRequest, | registration_response::Data::PakeRegistrationResponse, CompareUsersRequest, | ||||
CompareUsersResponse, DeleteUserRequest, DeleteUserResponse, | CompareUsersResponse, DeleteUserRequest, DeleteUserResponse, | ||||
GenerateNonceRequest, GenerateNonceResponse, | GenerateNonceRequest, GenerateNonceResponse, | ||||
GetSessionInitializationInfoRequest, GetSessionInitializationInfoResponse, | GetSessionInitializationInfoRequest, GetSessionInitializationInfoResponse, | ||||
GetUserIdRequest, GetUserIdResponse, LoginRequest, LoginResponse, | GetUserIdRequest, GetUserIdResponse, LoginRequest, LoginResponse, | ||||
PakeLoginRequest as PakeLoginRequestStruct, | PakeLoginRequest as PakeLoginRequestStruct, | ||||
PakeLoginResponse as PakeLoginResponseStruct, RegistrationRequest, | PakeLoginResponse as PakeLoginResponseStruct, RegistrationRequest, | ||||
RegistrationResponse, SessionInitializationInfo, VerifyUserTokenRequest, | RegistrationResponse, SessionInitializationInfo, UpdateUserRequest, | ||||
VerifyUserTokenResponse, WalletLoginRequest as WalletLoginRequestStruct, | UpdateUserResponse, VerifyUserTokenRequest, VerifyUserTokenResponse, | ||||
WalletLoginRequest as WalletLoginRequestStruct, | |||||
WalletLoginResponse as WalletLoginResponseStruct, | WalletLoginResponse as WalletLoginResponseStruct, | ||||
}; | }; | ||||
mod proto { | mod proto { | ||||
tonic::include_proto!("identity"); | tonic::include_proto!("identity"); | ||||
} | } | ||||
mod login; | mod login; | ||||
▲ Show 20 Lines • Show All 233 Lines • ▼ Show 20 Lines | match self | ||||
Ok(Response::new(GetSessionInitializationInfoResponse { | Ok(Response::new(GetSessionInitializationInfoResponse { | ||||
devices, | devices, | ||||
})) | })) | ||||
} | } | ||||
Ok(None) => return Err(Status::not_found("user not found")), | Ok(None) => return Err(Status::not_found("user not found")), | ||||
Err(e) => Err(handle_db_error(e)), | Err(e) => Err(handle_db_error(e)), | ||||
} | } | ||||
} | } | ||||
#[instrument(skip(self))] | |||||
async fn update_user( | |||||
&self, | |||||
request: Request<tonic::Streaming<UpdateUserRequest>>, | |||||
) -> Result<Response<Self::UpdateUserStream>, Status> { | |||||
unimplemented!(); | |||||
} | |||||
type UpdateUserStream = Pin< | |||||
Box<dyn Stream<Item = Result<UpdateUserResponse, Status>> + Send + 'static>, | |||||
>; | |||||
} | } | ||||
async fn put_token_helper( | async fn put_token_helper( | ||||
client: &DatabaseClient, | client: &DatabaseClient, | ||||
auth_type: AuthType, | auth_type: AuthType, | ||||
user_id: &str, | user_id: &str, | ||||
signing_public_key: &str, | signing_public_key: &str, | ||||
rng: &mut (impl Rng + CryptoRng), | rng: &mut (impl Rng + CryptoRng), | ||||
▲ Show 20 Lines • Show All 326 Lines • Show Last 20 Lines |