pub struct IdToken {
pub code: Option<String>,
pub id_token: String,
pub state: Option<String>,
pub session_state: Option<String>,
pub additional_fields: HashMap<String, Value>,
/* private fields */
}
Expand description
ID tokens are sent to the client application as part of an OpenID Connect flow. They can be sent alongside or instead of an access token. ID tokens are used by the client to authenticate the user. To learn more about how the Microsoft identity platform issues ID tokens, see ID tokens in the Microsoft identity platform.
Fields§
§code: Option<String>
§id_token: String
§state: Option<String>
§session_state: Option<String>
§additional_fields: HashMap<String, Value>
Implementations§
Source§impl IdToken
impl IdToken
pub fn new( id_token: &str, code: Option<&str>, state: Option<&str>, session_state: Option<&str>, ) -> IdToken
Sourcepub fn decode_payload(&self) -> Result<Value>
pub fn decode_payload(&self) -> Result<Value>
Decode the id token payload.
Sourcepub fn decode_header(&self) -> Result<Header>
pub fn decode_header(&self) -> Result<Header>
Decode the id token header.
Sourcepub fn enable_pii_logging(&mut self, log_pii: bool)
pub fn enable_pii_logging(&mut self, log_pii: bool)
Enable or disable logging of personally identifiable information such as logging the id_token. This is disabled by default. When log_pii is enabled passing an IdToken to logging or print functions will log id_token field. By default this does not get logged.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for IdToken
impl<'de> Deserialize<'de> for IdToken
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl TryFrom<AuthorizationResponse> for IdToken
impl TryFrom<AuthorizationResponse> for IdToken
Source§type Error = AuthorizationFailure
type Error = AuthorizationFailure
The type returned in the event of a conversion error.
impl Eq for IdToken
impl StructuralPartialEq for IdToken
Auto Trait Implementations§
impl Freeze for IdToken
impl RefUnwindSafe for IdToken
impl Send for IdToken
impl Sync for IdToken
impl Unpin for IdToken
impl UnwindSafe for IdToken
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