pub struct AuthorizationServer { /* private fields */ }Trait Implementations§
source§impl AuthAction for AuthorizationServer
impl AuthAction for AuthorizationServer
type AuthCallback = AuthCallback
type AuthToken = TokenResponse
type AuthUser = UserInfoResponse
fn get_access_token<'life0, 'async_trait>(
&'life0 self,
callback: Self::AuthCallback,
) -> Pin<Box<dyn Future<Output = Result<Self::AuthToken>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_user_info<'life0, 'async_trait>(
&'life0 self,
token: Self::AuthToken,
) -> Pin<Box<dyn Future<Output = Result<Self::AuthUser>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn login<'life0, 'async_trait>(
&'life0 self,
callback: Self::AuthCallback,
) -> Pin<Box<dyn Future<Output = Result<Self::AuthUser>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
source§impl AuthUrlProvider for AuthorizationServer
impl AuthUrlProvider for AuthorizationServer
type AuthRequest = AuthRequest
type TokenRequest = GetTokenRequest
type UserInfoRequest = GetUserInfoRequest
返回带redirect_ui和state参数的授权url,授权回调时会带上这个state。
用户端重定向至该URL地址进行认证授权
source§fn access_token_url(request: Self::TokenRequest) -> Result<String>
fn access_token_url(request: Self::TokenRequest) -> Result<String>
返回获取accessToken的url
source§fn user_info_url(request: Self::UserInfoRequest) -> Result<String>
fn user_info_url(request: Self::UserInfoRequest) -> Result<String>
返回获取userInfo的url
Auto Trait Implementations§
impl Freeze for AuthorizationServer
impl RefUnwindSafe for AuthorizationServer
impl Send for AuthorizationServer
impl Sync for AuthorizationServer
impl Unpin for AuthorizationServer
impl UnwindSafe for AuthorizationServer
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more