pub trait IdentityProvider:
Send
+ Sync
+ 'static {
Show 13 methods
// Required methods
fn authorize<'life0, 'async_trait>(
&'life0 self,
req: AuthorizeRequest,
) -> Pin<Box<dyn Future<Output = Result<AuthorizeResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn token<'life0, 'async_trait>(
&'life0 self,
req: TokenRequest,
) -> Pin<Box<dyn Future<Output = Result<TokenResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn introspect<'life0, 'async_trait>(
&'life0 self,
req: IntrospectRequest,
) -> Pin<Box<dyn Future<Output = Result<IntrospectResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn user_info<'life0, 'async_trait>(
&'life0 self,
call: IdentityCallContext,
req: UserInfoRequest,
) -> Pin<Box<dyn Future<Output = Result<UserInfoResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_grants<'life0, 'async_trait>(
&'life0 self,
call: IdentityCallContext,
req: ListGrantsRequest,
) -> Pin<Box<dyn Future<Output = Result<ListGrantsResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_grant<'life0, 'async_trait>(
&'life0 self,
call: IdentityCallContext,
req: GetGrantRequest,
) -> Pin<Box<dyn Future<Output = Result<GetGrantResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn revoke_grant<'life0, 'async_trait>(
&'life0 self,
call: IdentityCallContext,
req: RevokeGrantRequest,
) -> Pin<Box<dyn Future<Output = Result<RevokeGrantResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn configure<'life0, 'life1, 'async_trait>(
&'life0 self,
_name: &'life1 str,
_config: Map<String, Value>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn metadata(&self) -> Option<RuntimeMetadata> { ... }
fn warnings(&self) -> Vec<String> { ... }
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn start<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn close<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Expand description
Lifecycle and identity contract for Gestalt identity providers.
Required Methods§
Starts an RFC 6749 authorization flow.
Sourcefn token<'life0, 'async_trait>(
&'life0 self,
req: TokenRequest,
) -> Pin<Box<dyn Future<Output = Result<TokenResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn token<'life0, 'async_trait>(
&'life0 self,
req: TokenRequest,
) -> Pin<Box<dyn Future<Output = Result<TokenResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Issues or exchanges tokens via the RFC 6749 token endpoint.
Sourcefn introspect<'life0, 'async_trait>(
&'life0 self,
req: IntrospectRequest,
) -> Pin<Box<dyn Future<Output = Result<IntrospectResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn introspect<'life0, 'async_trait>(
&'life0 self,
req: IntrospectRequest,
) -> Pin<Box<dyn Future<Output = Result<IntrospectResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Introspects a bearer token via RFC 7662.
Sourcefn user_info<'life0, 'async_trait>(
&'life0 self,
call: IdentityCallContext,
req: UserInfoRequest,
) -> Pin<Box<dyn Future<Output = Result<UserInfoResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn user_info<'life0, 'async_trait>(
&'life0 self,
call: IdentityCallContext,
req: UserInfoRequest,
) -> Pin<Box<dyn Future<Output = Result<UserInfoResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns profile claims for the authenticated caller.
Sourcefn list_grants<'life0, 'async_trait>(
&'life0 self,
call: IdentityCallContext,
req: ListGrantsRequest,
) -> Pin<Box<dyn Future<Output = Result<ListGrantsResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_grants<'life0, 'async_trait>(
&'life0 self,
call: IdentityCallContext,
req: ListGrantsRequest,
) -> Pin<Box<dyn Future<Output = Result<ListGrantsResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Lists grant IDs visible to the caller.
Sourcefn get_grant<'life0, 'async_trait>(
&'life0 self,
call: IdentityCallContext,
req: GetGrantRequest,
) -> Pin<Box<dyn Future<Output = Result<GetGrantResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_grant<'life0, 'async_trait>(
&'life0 self,
call: IdentityCallContext,
req: GetGrantRequest,
) -> Pin<Box<dyn Future<Output = Result<GetGrantResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns one grant owned by the caller.
Sourcefn revoke_grant<'life0, 'async_trait>(
&'life0 self,
call: IdentityCallContext,
req: RevokeGrantRequest,
) -> Pin<Box<dyn Future<Output = Result<RevokeGrantResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn revoke_grant<'life0, 'async_trait>(
&'life0 self,
call: IdentityCallContext,
req: RevokeGrantRequest,
) -> Pin<Box<dyn Future<Output = Result<RevokeGrantResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Revokes one grant owned by the caller.
Provided Methods§
Sourcefn configure<'life0, 'life1, 'async_trait>(
&'life0 self,
_name: &'life1 str,
_config: Map<String, Value>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn configure<'life0, 'life1, 'async_trait>(
&'life0 self,
_name: &'life1 str,
_config: Map<String, Value>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Configures the provider before it starts serving requests.
Sourcefn metadata(&self) -> Option<RuntimeMetadata>
fn metadata(&self) -> Option<RuntimeMetadata>
Returns runtime metadata that should augment the static manifest.
Sourcefn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Performs an optional health check.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".