Trait AuthlyService

Source
pub trait AuthlyService:
    Send
    + Sync
    + 'static {
    type MessagesStream: Stream<Item = Result<ServiceMessage, Status>> + Send + 'static;

    // Required methods
    fn get_metadata<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Empty>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<ServiceMetadata>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_access_token<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Empty>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<AccessToken>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_resource_property_mappings<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Empty>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<PropertyMappingsResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn access_control<'life0, 'async_trait>(
        &'life0 self,
        request: Request<AccessControlRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<AccessControlResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn sign_certificate<'life0, 'async_trait>(
        &'life0 self,
        request: Request<CertificateSigningRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Certificate>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn messages<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Empty>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::MessagesStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn pong<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Empty>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, 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 AuthlyServiceServer.

Required Associated Types§

Source

type MessagesStream: Stream<Item = Result<ServiceMessage, Status>> + Send + 'static

Server streaming response type for the Messages method.

Required Methods§

Source

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

Fetch metadata about the service using this API.

Source

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

Exchange a valid session for an access token. The session info is passed as Authorization header or cookie.

Source

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

Get the current property mapping for the service.

Source

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

Perform remote access control. A valid access token must be passed in an Authorization bearer.

Source

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

Make Authly sign the given certificate signing request using the local CA.

Source

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

Subscribe to Authly messages.

Source

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

Respond to a ping.

Implementors§