pub struct IdTokenRequest<'a> {
pub subject: &'a str,
pub client_id: &'a str,
pub nonce: Option<&'a str>,
pub auth_time: Option<SystemTime>,
pub claims: Option<&'a HashMap<String, Value>>,
}Expand description
Request parameters for creating an ID token.
Use IdTokenRequest::new to construct with the required subject and
client_id, then chain optional setters for nonce, auth_time, and
extra claims.
§Example
let request = IdTokenRequest::new("user123", "client456")
.with_nonce("abc");Fields§
§subject: &'a str§client_id: &'a str§nonce: Option<&'a str>§auth_time: Option<SystemTime>§claims: Option<&'a HashMap<String, Value>>Implementations§
Source§impl<'a> IdTokenRequest<'a>
impl<'a> IdTokenRequest<'a>
Sourcepub fn new(subject: &'a str, client_id: &'a str) -> Self
pub fn new(subject: &'a str, client_id: &'a str) -> Self
Create a new ID token request with required subject and client_id.
Sourcepub fn with_nonce(self, nonce: &'a str) -> Self
pub fn with_nonce(self, nonce: &'a str) -> Self
Set the nonce value for replay protection.
Sourcepub fn with_auth_time(self, auth_time: SystemTime) -> Self
pub fn with_auth_time(self, auth_time: SystemTime) -> Self
Set the authentication time.
Sourcepub fn with_claims(self, claims: &'a HashMap<String, Value>) -> Self
pub fn with_claims(self, claims: &'a HashMap<String, Value>) -> Self
Set additional claims to include in the ID token.
Trait Implementations§
Source§impl<'a> Clone for IdTokenRequest<'a>
impl<'a> Clone for IdTokenRequest<'a>
Source§fn clone(&self) -> IdTokenRequest<'a>
fn clone(&self) -> IdTokenRequest<'a>
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 moreSource§impl<'a> Debug for IdTokenRequest<'a>
impl<'a> Debug for IdTokenRequest<'a>
Source§impl<'a> Default for IdTokenRequest<'a>
impl<'a> Default for IdTokenRequest<'a>
Source§fn default() -> IdTokenRequest<'a>
fn default() -> IdTokenRequest<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for IdTokenRequest<'a>
impl<'a> RefUnwindSafe for IdTokenRequest<'a>
impl<'a> Send for IdTokenRequest<'a>
impl<'a> Sync for IdTokenRequest<'a>
impl<'a> Unpin for IdTokenRequest<'a>
impl<'a> UnsafeUnpin for IdTokenRequest<'a>
impl<'a> UnwindSafe for IdTokenRequest<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more