Skip to main content

IdentityProvider

Trait IdentityProvider 

Source
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§

Source

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,

Starts an RFC 6749 authorization flow.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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§

Source

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.

Source

fn metadata(&self) -> Option<RuntimeMetadata>

Returns runtime metadata that should augment the static manifest.

Source

fn warnings(&self) -> Vec<String>

Returns non-fatal warnings the host should surface to users.

Source

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.

Source

fn start<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Starts provider-owned background work after configuration.

Source

fn close<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Shuts the provider down before the runtime exits.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§