pub struct LocalAsyncAuthorizationServiceClient<C> { /* private fields */ }Trait Implementations§
Source§impl<C> AsyncService<C> for LocalAsyncAuthorizationServiceClient<C>
impl<C> AsyncService<C> for LocalAsyncAuthorizationServiceClient<C>
Source§fn new(client: C, runtime: &Arc<ConjureRuntime>) -> Self
fn new(client: C, runtime: &Arc<ConjureRuntime>) -> Self
Creates a new service wrapping an async HTTP client.
Source§impl<C: Clone> Clone for LocalAsyncAuthorizationServiceClient<C>
impl<C: Clone> Clone for LocalAsyncAuthorizationServiceClient<C>
Source§fn clone(&self) -> LocalAsyncAuthorizationServiceClient<C>
fn clone(&self) -> LocalAsyncAuthorizationServiceClient<C>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<C: Debug> Debug for LocalAsyncAuthorizationServiceClient<C>
impl<C: Debug> Debug for LocalAsyncAuthorizationServiceClient<C>
Source§impl<I: Stream<Item = Result<Bytes, Error>>, __C> LocalAsyncAuthorizationService<I> for LocalAsyncAuthorizationServiceClient<__C>where
__C: LocalAsyncClient<ResponseBody = I>,
impl<I: Stream<Item = Result<Bytes, Error>>, __C> LocalAsyncAuthorizationService<I> for LocalAsyncAuthorizationServiceClient<__C>where
__C: LocalAsyncClient<ResponseBody = I>,
Given a set of resources, returns the set of resources that the
user is authorized to access.
Source§async fn batch_get_workspace_for_resource(
&self,
auth_: &BearerToken,
request: &BTreeSet<ResourceIdentifier>,
) -> Result<BTreeMap<ResourceIdentifier, WorkspaceRid>, Error>
async fn batch_get_workspace_for_resource( &self, auth_: &BearerToken, request: &BTreeSet<ResourceIdentifier>, ) -> Result<BTreeMap<ResourceIdentifier, WorkspaceRid>, Error>
Given a set of resources, returns the workspace that each resource belongs to. If a user
is not authorized on the resource, will omit the resource from the response.
Source§async fn register_in_workspace(
&self,
auth_: &BearerToken,
request: &RegisterInWorkspaceRequest,
) -> Result<(), Error>
async fn register_in_workspace( &self, auth_: &BearerToken, request: &RegisterInWorkspaceRequest, ) -> Result<(), Error>
Marks a set of resources as belonging to a workspace. Either all resources are
registered or none are.
If the user is not in the workspace, this will throw.
If a resource already belongs to a different workspace, this will throw.
If a resource already belongs to this workspace, this is a no-op.
Source§async fn check_admin(&self, auth_: &BearerToken) -> Result<(), Error>
async fn check_admin(&self, auth_: &BearerToken) -> Result<(), Error>
Given an authenticated session, this endpoint returns a HTTP 204 if the
authenticated user is an admin and HTTP 403 otherwise.
Source§async fn is_email_allowed(
&self,
request: &IsEmailAllowedRequest,
) -> Result<IsEmailAllowedResponse, Error>
async fn is_email_allowed( &self, request: &IsEmailAllowedRequest, ) -> Result<IsEmailAllowedResponse, Error>
Checks if the email is allowed to register.
Source§async fn is_email_allowed_okta(
&self,
request: &OktaRegistrationRequest,
) -> Result<OktaRegistrationResponse, Error>
async fn is_email_allowed_okta( &self, request: &OktaRegistrationRequest, ) -> Result<OktaRegistrationResponse, Error>
Checks if the email is allowed to register, following Okta “registration inline hook” API.
Source§async fn get_user_orgs(
&self,
request: &GetUserOrgsRequest,
) -> Result<GetUserOrgsResponse, Error>
async fn get_user_orgs( &self, request: &GetUserOrgsRequest, ) -> Result<GetUserOrgsResponse, Error>
Provides an OIDC ID token to get the orgs that the user is a member of. Throws NotAuthorized if the ID token
is invalid or if the OIDC provider is not known.
Source§async fn get_access_token(
&self,
request: &GetAccessTokenRequest,
) -> Result<GetAccessTokenResponse, Error>
async fn get_access_token( &self, request: &GetAccessTokenRequest, ) -> Result<GetAccessTokenResponse, Error>
Provide an OIDC ID token to get a Nominal access token suitable for making API requests.
Its expiry will match that of the input ID token, capped at 24h. TODO(MGMT-933): reduce this duration.
Throws NotAuthorized if the ID token is invalid or if the OIDC provider is not known.
Source§async fn refresh_access_token(
&self,
request: &RefreshAccessTokenRequest,
) -> Result<RefreshAccessTokenResponse, Error>
async fn refresh_access_token( &self, request: &RefreshAccessTokenRequest, ) -> Result<RefreshAccessTokenResponse, Error>
Given an authenticated session, provide an OIDC access token to get a Nominal access token suitable
for making API requests. Its expiry will match that of the input access token, capped at 24h. TODO(MGMT-933):
reduce this duration. Throws NotAuthorized if the access token is invalid or if the OIDC provider is not
known.
Source§async fn create_api_key(
&self,
auth_: &BearerToken,
request: &CreateApiKeyRequest,
) -> Result<CreateApiKeyResponse, Error>
async fn create_api_key( &self, auth_: &BearerToken, request: &CreateApiKeyRequest, ) -> Result<CreateApiKeyResponse, Error>
Provide a long-lived API key for making API requests.
The API key is irretrievable after initial creation.
Source§async fn list_api_keys_in_org(
&self,
auth_: &BearerToken,
request: &ListApiKeyRequest,
) -> Result<ListApiKeyResponse, Error>
async fn list_api_keys_in_org( &self, auth_: &BearerToken, request: &ListApiKeyRequest, ) -> Result<ListApiKeyResponse, Error>
List all API keys in the organization.
Source§async fn list_user_api_keys(
&self,
auth_: &BearerToken,
request: &ListApiKeyRequest,
) -> Result<ListApiKeyResponse, Error>
async fn list_user_api_keys( &self, auth_: &BearerToken, request: &ListApiKeyRequest, ) -> Result<ListApiKeyResponse, Error>
List all API keys for the user.
Source§async fn revoke_api_key(
&self,
auth_: &BearerToken,
rid: &ApiKeyRid,
) -> Result<(), Error>
async fn revoke_api_key( &self, auth_: &BearerToken, rid: &ApiKeyRid, ) -> Result<(), Error>
Delete an API key.
Auto Trait Implementations§
impl<C> Freeze for LocalAsyncAuthorizationServiceClient<C>where
C: Freeze,
impl<C> !RefUnwindSafe for LocalAsyncAuthorizationServiceClient<C>
impl<C> Send for LocalAsyncAuthorizationServiceClient<C>where
C: Send,
impl<C> Sync for LocalAsyncAuthorizationServiceClient<C>where
C: Sync,
impl<C> Unpin for LocalAsyncAuthorizationServiceClient<C>where
C: Unpin,
impl<C> UnsafeUnpin for LocalAsyncAuthorizationServiceClient<C>where
C: UnsafeUnpin,
impl<C> !UnwindSafe for LocalAsyncAuthorizationServiceClient<C>
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Wrap the input message
T in a tonic::Request