pub struct IdentityToken { /* private fields */ }Expand description
An OIDC identity token
Implementations§
Source§impl IdentityToken
impl IdentityToken
Sourcepub async fn detect_ambient() -> Result<Option<Self>>
pub async fn detect_ambient() -> Result<Option<Self>>
Detect and retrieve an ambient identity token from the current environment
This attempts to find OIDC credentials in environments like GitHub Actions,
GitLab CI, Buildkite, etc. using the ambient-id crate.
Sourcepub fn email_verified(&self) -> bool
pub fn email_verified(&self) -> bool
Check if the email is verified
Sourcepub fn expiration(&self) -> u64
pub fn expiration(&self) -> u64
Get the expiration time
Sourcepub fn is_expired(&self) -> bool
pub fn is_expired(&self) -> bool
Check if the token is expired
Sourcepub fn claims(&self) -> &TokenClaims
pub fn claims(&self) -> &TokenClaims
Get the claims
Trait Implementations§
Source§impl Clone for IdentityToken
impl Clone for IdentityToken
Source§fn clone(&self) -> IdentityToken
fn clone(&self) -> IdentityToken
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 IdentityToken
impl RefUnwindSafe for IdentityToken
impl Send for IdentityToken
impl Sync for IdentityToken
impl Unpin for IdentityToken
impl UnsafeUnpin for IdentityToken
impl UnwindSafe for IdentityToken
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