pub struct AuthHandler { /* private fields */ }Expand description
Orchestrates auth flows: retrieves stored credentials and generates auth requests.
Implementations§
Source§impl AuthHandler
impl AuthHandler
Sourcepub fn new(config: AuthConfig) -> Self
pub fn new(config: AuthConfig) -> Self
Create a new auth handler with the given configuration.
Sourcepub fn get_auth_response(&self, state: &State) -> Option<AuthCredential>
pub fn get_auth_response(&self, state: &State) -> Option<AuthCredential>
Retrieve the auth credential from state (looks up “temp:{credential_key}”).
Sourcepub fn generate_auth_request(&self) -> AuthConfig
pub fn generate_auth_request(&self) -> AuthConfig
Generate an auth request config for the client to fulfill (e.g. OAuth2 redirect).
Sourcepub fn config(&self) -> &AuthConfig
pub fn config(&self) -> &AuthConfig
Get the auth config.
Auto Trait Implementations§
impl Freeze for AuthHandler
impl RefUnwindSafe for AuthHandler
impl Send for AuthHandler
impl Sync for AuthHandler
impl Unpin for AuthHandler
impl UnsafeUnpin for AuthHandler
impl UnwindSafe for AuthHandler
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