Trait momento_protos::auth::auth_server::Auth

source ·
pub trait Auth: Send + Sync + 'static {
    type LoginStream: Stream<Item = Result<LoginResponse, Status>> + Send + 'static;

    // Required methods
    fn login<'life0, 'async_trait>(
        &'life0 self,
        request: Request<LoginRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::LoginStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn generate_api_token<'life0, 'async_trait>(
        &'life0 self,
        request: Request<GenerateApiTokenRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<GenerateApiTokenResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn refresh_api_token<'life0, 'async_trait>(
        &'life0 self,
        request: Request<RefreshApiTokenRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<RefreshApiTokenResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Generated trait containing gRPC methods that should be implemented for use with AuthServer.

Required Associated Types§

source

type LoginStream: Stream<Item = Result<LoginResponse, Status>> + Send + 'static

Server streaming response type for the Login method.

Required Methods§

source

fn login<'life0, 'async_trait>( &'life0 self, request: Request<LoginRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::LoginStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn generate_api_token<'life0, 'async_trait>( &'life0 self, request: Request<GenerateApiTokenRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<GenerateApiTokenResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

api for initially generating api and refresh tokens

source

fn refresh_api_token<'life0, 'async_trait>( &'life0 self, request: Request<RefreshApiTokenRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<RefreshApiTokenResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

api for programmatically refreshing api and refresh tokens

Implementors§