Skip to main content

AuthNResolverPluginClient

Trait AuthNResolverPluginClient 

Source
pub trait AuthNResolverPluginClient: Send + Sync {
    // Required method
    fn authenticate<'life0, 'life1, 'async_trait>(
        &'life0 self,
        bearer_token: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<AuthenticationResult, AuthNResolverError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Plugin API trait for AuthN resolver implementations.

Each plugin registers this trait with a scoped ClientHub entry using its GTS instance ID as the scope.

The gateway delegates to this method. Cross-cutting concerns (logging, metrics) may be added at the gateway level in the future.

Required Methods§

Source

fn authenticate<'life0, 'life1, 'async_trait>( &'life0 self, bearer_token: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<AuthenticationResult, AuthNResolverError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Authenticate a bearer token and return the validated identity.

§Arguments
  • bearer_token - The raw bearer token string
§Errors
  • Unauthorized if the token is invalid, expired, or malformed
  • Internal for unexpected errors

Implementors§