Trait AuthenticationApi

Source
pub trait AuthenticationApi {
    // Required methods
    fn bearer_authorization(
        &self,
        token: &Bearer,
    ) -> Result<Authorization, ApiError>;
    fn apikey_authorization(
        &self,
        token: &str,
    ) -> Result<Authorization, ApiError>;
    fn basic_authorization(
        &self,
        basic: &Basic,
    ) -> Result<Authorization, ApiError>;
}

Required Methods§

Source

fn bearer_authorization( &self, token: &Bearer, ) -> Result<Authorization, ApiError>

Method should be implemented (see example-code) to map Bearer-token to an Authorization

Source

fn apikey_authorization(&self, token: &str) -> Result<Authorization, ApiError>

Method should be implemented (see example-code) to map ApiKey to an Authorization

Source

fn basic_authorization(&self, basic: &Basic) -> Result<Authorization, ApiError>

Method should be implemented (see example-code) to map Basic (Username:password) to an Authorization

Implementations on Foreign Types§

Source§

impl<T, RC> AuthenticationApi for AllowAllAuthenticator<T, RC>
where RC: RcBound, RC::Result: Send + 'static,

Source§

fn bearer_authorization( &self, _token: &Bearer, ) -> Result<Authorization, ApiError>

Get method to map Bearer-token to an Authorization

Source§

fn apikey_authorization(&self, _apikey: &str) -> Result<Authorization, ApiError>

Get method to map api-key to an Authorization

Source§

fn basic_authorization(&self, _basic: &Basic) -> Result<Authorization, ApiError>

Get method to map basic token to an Authorization

Implementors§

Source§

impl<T, C> AuthenticationApi for Service<T, C>
where T: Api<C> + Clone + Send + 'static + AuthenticationApi, C: Has<XSpanIdString> + Has<Option<Authorization>> + Send + Sync + 'static,