pub struct SessionCookieVerifier { /* private fields */ }Expand description
Verifies Firebase session cookies against Google’s session-cookie certificate endpoint and the project’s expected issuer/audience.
Implementations§
Source§impl SessionCookieVerifier
impl SessionCookieVerifier
Sourcepub fn new(project_id: ProjectId, certs: SessionCookieCertCache) -> Self
pub fn new(project_id: ProjectId, certs: SessionCookieCertCache) -> Self
Creates a verifier for the given project, using the given cert cache.
Sourcepub async fn verify(
&self,
cookie: &str,
) -> Result<IdTokenClaims, TokenVerificationError>
pub async fn verify( &self, cookie: &str, ) -> Result<IdTokenClaims, TokenVerificationError>
Verifies a session cookie, returning its claims if every check
passes: signature, exp, iat/auth_time, aud, iss, and
non-empty sub.
Auto Trait Implementations§
impl !Freeze for SessionCookieVerifier
impl !RefUnwindSafe for SessionCookieVerifier
impl !UnwindSafe for SessionCookieVerifier
impl Send for SessionCookieVerifier
impl Sync for SessionCookieVerifier
impl Unpin for SessionCookieVerifier
impl UnsafeUnpin for SessionCookieVerifier
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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