AuthApi

Trait AuthApi 

Source
pub trait AuthApi: Send + Sync {
    // Required methods
    fn delete_session<'id, 'refresh_token, 'life0, 'async_trait>(
        &'life0 self,
        id: Option<&'id str>,
        refresh_token: Option<&'refresh_token str>,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<DeleteSessionError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'id: 'async_trait,
             'refresh_token: 'async_trait,
             'life0: 'async_trait;
    fn get_api_tokens<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<UserApiTokenDto>, Error<GetApiTokensError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_o_auth_token<'use_cookie, 'client_id, 'code, 'code_verifier, 'grant_type, 'redirect_uri, 'refresh_token, 'life0, 'async_trait>(
        &'life0 self,
        use_cookie: Option<bool>,
        client_id: Option<&'client_id str>,
        code: Option<&'code str>,
        code_verifier: Option<&'code_verifier str>,
        grant_type: Option<&'grant_type str>,
        redirect_uri: Option<&'redirect_uri str>,
        refresh_token: Option<&'refresh_token str>,
    ) -> Pin<Box<dyn Future<Output = Result<TokenResponseDto, Error<GetOAuthTokenError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'use_cookie: 'async_trait,
             'client_id: 'async_trait,
             'code: 'async_trait,
             'code_verifier: 'async_trait,
             'grant_type: 'async_trait,
             'redirect_uri: 'async_trait,
             'refresh_token: 'async_trait,
             'life0: 'async_trait;
    fn get_sessions_for_current_user<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<UserSessionDto>, Error<GetSessionsForCurrentUserError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn remove_api_token<'name, 'life0, 'async_trait>(
        &'life0 self,
        name: &'name str,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<RemoveApiTokenError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'name: 'async_trait,
             'life0: 'async_trait;
}
Available on crate feature auth_api only.

Required Methods§

Source

fn delete_session<'id, 'refresh_token, 'life0, 'async_trait>( &'life0 self, id: Option<&'id str>, refresh_token: Option<&'refresh_token str>, ) -> Pin<Box<dyn Future<Output = Result<(), Error<DeleteSessionError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'id: 'async_trait, 'refresh_token: 'async_trait, 'life0: 'async_trait,

POST /auth/logout

Source

fn get_api_tokens<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<UserApiTokenDto>, Error<GetApiTokensError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

GET /auth/apitokens

Source

fn get_o_auth_token<'use_cookie, 'client_id, 'code, 'code_verifier, 'grant_type, 'redirect_uri, 'refresh_token, 'life0, 'async_trait>( &'life0 self, use_cookie: Option<bool>, client_id: Option<&'client_id str>, code: Option<&'code str>, code_verifier: Option<&'code_verifier str>, grant_type: Option<&'grant_type str>, redirect_uri: Option<&'redirect_uri str>, refresh_token: Option<&'refresh_token str>, ) -> Pin<Box<dyn Future<Output = Result<TokenResponseDto, Error<GetOAuthTokenError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'use_cookie: 'async_trait, 'client_id: 'async_trait, 'code: 'async_trait, 'code_verifier: 'async_trait, 'grant_type: 'async_trait, 'redirect_uri: 'async_trait, 'refresh_token: 'async_trait, 'life0: 'async_trait,

POST /auth/token

Source

fn get_sessions_for_current_user<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<UserSessionDto>, Error<GetSessionsForCurrentUserError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

GET /auth/sessions

Source

fn remove_api_token<'name, 'life0, 'async_trait>( &'life0 self, name: &'name str, ) -> Pin<Box<dyn Future<Output = Result<(), Error<RemoveApiTokenError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'name: 'async_trait, 'life0: 'async_trait,

DELETE /auth/apitokens/{name}

Implementors§