pub struct VerifiedIdToken { /* private fields */ }Expand description
The claims of an ID token whose signature, issuer, audience and lifetime
IdTokenVerifier::verify checked. Only the verifier creates it.
Implementations§
Source§impl VerifiedIdToken
impl VerifiedIdToken
Sourcepub fn audience(&self) -> &IdTokenAudience
pub fn audience(&self) -> &IdTokenAudience
The aud claim, which is the verifier’s audience.
Sourcepub fn email(&self) -> Option<&PrincipalEmail>
pub fn email(&self) -> Option<&PrincipalEmail>
The email claim, present when the token was minted with the principal’s email,
whether or not Google verified it.
Sourcepub fn email_verified(&self) -> Option<bool>
pub fn email_verified(&self) -> Option<bool>
The email_verified claim.
Sourcepub fn verified_email(&self) -> Option<&PrincipalEmail>
pub fn verified_email(&self) -> Option<&PrincipalEmail>
The email when the token says Google verified it: the principal to authorize.
Sourcepub fn hosted_domain(&self) -> Option<&str>
pub fn hosted_domain(&self) -> Option<&str>
The hd claim: the Google Workspace or Cloud Identity domain of a user.
Sourcepub fn expires_at(&self) -> Timestamp
pub fn expires_at(&self) -> Timestamp
The exp claim.
Trait Implementations§
Source§impl Clone for VerifiedIdToken
impl Clone for VerifiedIdToken
Source§impl Debug for VerifiedIdToken
impl Debug for VerifiedIdToken
Source§impl<S: Send + Sync> FromRequestParts<S> for VerifiedIdToken
The claims of the token VerifyIdTokenLayer verified for this request.
impl<S: Send + Sync> FromRequestParts<S> for VerifiedIdToken
The claims of the token VerifyIdTokenLayer verified for this request.
Rejects with 500 when the route is not behind a VerifyIdTokenLayer, since that
is a mistake in the server, not in the request.
Auto Trait Implementations§
impl Freeze for VerifiedIdToken
impl RefUnwindSafe for VerifiedIdToken
impl Send for VerifiedIdToken
impl Sync for VerifiedIdToken
impl Unpin for VerifiedIdToken
impl UnsafeUnpin for VerifiedIdToken
impl UnwindSafe for VerifiedIdToken
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<S, T> FromRequest<S, ViaParts> for T
impl<S, T> FromRequest<S, ViaParts> for T
Source§type Rejection = <T as FromRequestParts<S>>::Rejection
type Rejection = <T as FromRequestParts<S>>::Rejection
If the extractor fails it’ll use this “rejection” type. A rejection is
a kind of error that can be converted into a response.
Source§fn from_request(
req: Request<Body>,
state: &S,
) -> impl Future<Output = Result<T, <T as FromRequest<S, ViaParts>>::Rejection>>
fn from_request( req: Request<Body>, state: &S, ) -> impl Future<Output = Result<T, <T as FromRequest<S, ViaParts>>::Rejection>>
Perform the extraction.
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request