pub struct AuthorizationSession {
pub tenant: TenantId,
pub principal: PrincipalId,
pub scope: ScopeSet,
pub state: String,
pub redirect_uri: Url,
pub authorize_url: Url,
/* private fields */
}Expand description
Authorization Code + PKCE handshake metadata returned by [Broker::start_authorization].
Fields§
§tenant: TenantIdTenant identifier tied to the session.
principal: PrincipalIdPrincipal identifier tied to the session.
scope: ScopeSetRequested scope set (prior to any provider overrides during exchange).
state: StringOpaque state value that must round-trip via the redirect handler.
redirect_uri: UrlRedirect URI supplied when constructing the authorize URL.
Fully-formed HTTPS authorize URL that callers should send end-users to.
Implementations§
Source§impl AuthorizationSession
impl AuthorizationSession
Sourcepub fn code_challenge(&self) -> &str
pub fn code_challenge(&self) -> &str
PKCE code challenge derived from the secret verifier.
Sourcepub fn code_challenge_method(&self) -> PkceCodeChallengeMethod
pub fn code_challenge_method(&self) -> PkceCodeChallengeMethod
PKCE challenge method (currently always S256).
Sourcepub fn validate_state(&self, returned_state: &str) -> Result<()>
pub fn validate_state(&self, returned_state: &str) -> Result<()>
Validates the returned state parameter after the authorization redirect.
Trait Implementations§
Source§impl Clone for AuthorizationSession
impl Clone for AuthorizationSession
Source§fn clone(&self) -> AuthorizationSession
fn clone(&self) -> AuthorizationSession
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !Freeze for AuthorizationSession
impl RefUnwindSafe for AuthorizationSession
impl Send for AuthorizationSession
impl Sync for AuthorizationSession
impl Unpin for AuthorizationSession
impl UnwindSafe for AuthorizationSession
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