Trait telescope::web::services::auth::oauth2_providers::Oauth2Identity[][src]

pub trait Oauth2Identity {
    const USER_ACCOUNT_TY: UserAccountType;

    fn from_basic_token(token: &BasicTokenResponse) -> Self;
fn platform_user_id(
        &self
    ) -> LocalBoxFuture<'_, Result<String, TelescopeError>>;
fn into_root(self) -> RootIdentity;
fn add_to_cookie(self, cookie: &mut AuthenticationCookie); }
Expand description

Trait for identity types provided by OAuth2 Identity Providers.

Associated Constants

The type of user account provided by this authentication cookie.

Required methods

Convert a basic token response into this identity type.

Get the on-platform user ID for the authenticated user.

Create a root identity object from this platform identity.

Add this platform identity to the user’s auth cookie.

Implementors