pub struct UserManagementServiceClient<T> { /* private fields */ }Expand description
Service to manage users and their rights for interacting with the Ledger API served by a participant node.
The authorization rules for its RPCs are specified on the <RpcName>Request
messages as boolean expressions over these facts:
HasRight(r)denoting whether the authenticated user has rightrandIsAuthenticatedUser(uid)denoting whetheruidis the empty string or equal to the id of the authenticated user.IsAuthenticatedIdentityProviderAdmin(idp)denoting whetheridpis equal to theidentity_provider_idof the authenticated user and the user has an IdentityProviderAdmin right.
If user_id is set to the empty string (the default), then the data for the authenticated user will be retrieved.
If identity_provider_id is set to an empty string, then it’s effectively set to the value of access token’s ‘iss’ field if that is provided.
If identity_provider_id remains an empty string, the default identity provider will be assumed.
The fields of request messages (and sub-messages) are marked either as Optional or Required:
Optionaldenoting the client may leave the field unset when sending a request.Requireddenoting the client must set the field to a non-default value when sending a request.
A user resource consists of:
- a set of properties represented by the
Usermessage, - a set of user rights, where each right is represented by the
Rightmessage.
A user resource, once it has been created, can be modified.
In order to update the properties represented by the User message use the UpdateUser RPC. The only fields that can be modified are those marked as Modifiable.
In order to grant or revoke user rights use GrantRights' and RevokeRights`` RPCs.
Implementations§
Source§impl<T> UserManagementServiceClient<T>where
T: GrpcService<Body>,
<T as GrpcService<Body>>::Error: Into<Box<dyn Error + Sync + Send>>,
<T as GrpcService<Body>>::ResponseBody: Body<Data = Bytes> + Send + 'static,
<<T as GrpcService<Body>>::ResponseBody as Body>::Error: Into<Box<dyn Error + Sync + Send>> + Send,
impl<T> UserManagementServiceClient<T>where
T: GrpcService<Body>,
<T as GrpcService<Body>>::Error: Into<Box<dyn Error + Sync + Send>>,
<T as GrpcService<Body>>::ResponseBody: Body<Data = Bytes> + Send + 'static,
<<T as GrpcService<Body>>::ResponseBody as Body>::Error: Into<Box<dyn Error + Sync + Send>> + Send,
pub fn new(inner: T) -> UserManagementServiceClient<T>
pub fn with_origin(inner: T, origin: Uri) -> UserManagementServiceClient<T>
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> UserManagementServiceClient<InterceptedService<T, F>>where
F: Interceptor,
<T as GrpcService<Body>>::ResponseBody: Default,
T: Service<Request<Body>, Response = Response<<T as GrpcService<Body>>::ResponseBody>>,
<T as Service<Request<Body>>>::Error: Into<Box<dyn Error + Sync + Send>> + Send + Sync,
Sourcepub fn send_compressed(
self,
encoding: CompressionEncoding,
) -> UserManagementServiceClient<T>
pub fn send_compressed( self, encoding: CompressionEncoding, ) -> UserManagementServiceClient<T>
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
Sourcepub fn accept_compressed(
self,
encoding: CompressionEncoding,
) -> UserManagementServiceClient<T>
pub fn accept_compressed( self, encoding: CompressionEncoding, ) -> UserManagementServiceClient<T>
Enable decompressing responses.
Sourcepub fn max_decoding_message_size(
self,
limit: usize,
) -> UserManagementServiceClient<T>
pub fn max_decoding_message_size( self, limit: usize, ) -> UserManagementServiceClient<T>
Limits the maximum size of a decoded message.
Default: 4MB
Sourcepub fn max_encoding_message_size(
self,
limit: usize,
) -> UserManagementServiceClient<T>
pub fn max_encoding_message_size( self, limit: usize, ) -> UserManagementServiceClient<T>
Limits the maximum size of an encoded message.
Default: usize::MAX
Sourcepub async fn create_user(
&mut self,
request: impl IntoRequest<CreateUserRequest>,
) -> Result<Response<CreateUserResponse>, Status>
pub async fn create_user( &mut self, request: impl IntoRequest<CreateUserRequest>, ) -> Result<Response<CreateUserResponse>, Status>
Create a new user.
Sourcepub async fn get_user(
&mut self,
request: impl IntoRequest<GetUserRequest>,
) -> Result<Response<GetUserResponse>, Status>
pub async fn get_user( &mut self, request: impl IntoRequest<GetUserRequest>, ) -> Result<Response<GetUserResponse>, Status>
Get the user data of a specific user or the authenticated user.
Sourcepub async fn update_user(
&mut self,
request: impl IntoRequest<UpdateUserRequest>,
) -> Result<Response<UpdateUserResponse>, Status>
pub async fn update_user( &mut self, request: impl IntoRequest<UpdateUserRequest>, ) -> Result<Response<UpdateUserResponse>, Status>
Update selected modifiable attribute of a user resource described by the User message.
Sourcepub async fn delete_user(
&mut self,
request: impl IntoRequest<DeleteUserRequest>,
) -> Result<Response<DeleteUserResponse>, Status>
pub async fn delete_user( &mut self, request: impl IntoRequest<DeleteUserRequest>, ) -> Result<Response<DeleteUserResponse>, Status>
Delete an existing user and all its rights.
Sourcepub async fn list_users(
&mut self,
request: impl IntoRequest<ListUsersRequest>,
) -> Result<Response<ListUsersResponse>, Status>
pub async fn list_users( &mut self, request: impl IntoRequest<ListUsersRequest>, ) -> Result<Response<ListUsersResponse>, Status>
List all existing users.
Sourcepub async fn grant_user_rights(
&mut self,
request: impl IntoRequest<GrantUserRightsRequest>,
) -> Result<Response<GrantUserRightsResponse>, Status>
pub async fn grant_user_rights( &mut self, request: impl IntoRequest<GrantUserRightsRequest>, ) -> Result<Response<GrantUserRightsResponse>, Status>
Grant rights to a user. Granting rights does not affect the resource version of the corresponding user.
Sourcepub async fn revoke_user_rights(
&mut self,
request: impl IntoRequest<RevokeUserRightsRequest>,
) -> Result<Response<RevokeUserRightsResponse>, Status>
pub async fn revoke_user_rights( &mut self, request: impl IntoRequest<RevokeUserRightsRequest>, ) -> Result<Response<RevokeUserRightsResponse>, Status>
Revoke rights from a user. Revoking rights does not affect the resource version of the corresponding user.
Sourcepub async fn list_user_rights(
&mut self,
request: impl IntoRequest<ListUserRightsRequest>,
) -> Result<Response<ListUserRightsResponse>, Status>
pub async fn list_user_rights( &mut self, request: impl IntoRequest<ListUserRightsRequest>, ) -> Result<Response<ListUserRightsResponse>, Status>
List the set of all rights granted to a user.
Sourcepub async fn update_user_identity_provider_id(
&mut self,
request: impl IntoRequest<UpdateUserIdentityProviderIdRequest>,
) -> Result<Response<UpdateUserIdentityProviderIdResponse>, Status>
pub async fn update_user_identity_provider_id( &mut self, request: impl IntoRequest<UpdateUserIdentityProviderIdRequest>, ) -> Result<Response<UpdateUserIdentityProviderIdResponse>, Status>
Update the assignment of a user from one IDP to another.
Trait Implementations§
Source§impl<T> Clone for UserManagementServiceClient<T>where
T: Clone,
impl<T> Clone for UserManagementServiceClient<T>where
T: Clone,
Source§fn clone(&self) -> UserManagementServiceClient<T>
fn clone(&self) -> UserManagementServiceClient<T>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<T> !Freeze for UserManagementServiceClient<T>
impl<T> RefUnwindSafe for UserManagementServiceClient<T>where
Grpc<T>: RefUnwindSafe,
impl<T> Send for UserManagementServiceClient<T>
impl<T> Sync for UserManagementServiceClient<T>
impl<T> Unpin for UserManagementServiceClient<T>
impl<T> UnsafeUnpin for UserManagementServiceClient<T>where
Grpc<T>: UnsafeUnpin,
impl<T> UnwindSafe for UserManagementServiceClient<T>where
Grpc<T>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request