pub struct SessionCookieCertCache { /* private fields */ }Expand description
Fetches and caches the X.509 certificates Google publishes for verifying Firebase session cookies.
Mirrors crate::auth::id_token::JwksCache’s single-flight refresh
design: concurrent lookups that miss the cache at the same time share one
in-flight fetch rather than each issuing their own HTTP request.
Implementations§
Source§impl SessionCookieCertCache
impl SessionCookieCertCache
Sourcepub fn new(http: HttpClient) -> Self
pub fn new(http: HttpClient) -> Self
Creates a cache pointed at the standard session-cookie certs endpoint.
Sourcepub async fn public_key(
&self,
kid: &str,
) -> Result<(String, String), TokenVerificationError>
pub async fn public_key( &self, kid: &str, ) -> Result<(String, String), TokenVerificationError>
Returns the RSA public key components (n, e, base64url-encoded)
for the given key id, fetching or refreshing the cache as needed.
Auto Trait Implementations§
impl !Freeze for SessionCookieCertCache
impl !RefUnwindSafe for SessionCookieCertCache
impl !UnwindSafe for SessionCookieCertCache
impl Send for SessionCookieCertCache
impl Sync for SessionCookieCertCache
impl Unpin for SessionCookieCertCache
impl UnsafeUnpin for SessionCookieCertCache
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