Trait AuthState

Source
pub trait AuthState<S: Subject>:
    Send
    + Sync
    + 'static {
    type Authn: AuthenticationService<S>;
    type Authz: AuthorizationService<S>;

    // Required methods
    fn authn(&self) -> &Self::Authn;
    fn authz(&self) -> &Self::Authz;
}
Expand description

Trait implemented by the application State to provide specific auth service types.

Required Associated Types§

Source

type Authn: AuthenticationService<S>

The concrete Authentication Service type

Source

type Authz: AuthorizationService<S>

The concrete Authorization Service type

Required Methods§

Source

fn authn(&self) -> &Self::Authn

Retrieves the authentication service

Source

fn authz(&self) -> &Self::Authz

Retrieves the authorization service

Implementors§