Add email to id_token
This commit is contained in:
@ -23,11 +23,13 @@ pub struct IdToken {
|
||||
/// String value used to associate a Client session with an ID Token, and to mitigate replay attacks. The value is passed through unmodified from the Authentication Request to the ID Token. If present in the ID Token, Clients MUST verify that the nonce Claim Value is equal to the value of the nonce parameter sent in the Authentication Request. If present in the Authentication Request, Authorization Servers MUST include a nonce Claim in the ID Token with the Claim Value being the nonce value sent in the Authentication Request. Authorization Servers SHOULD perform no other processing on nonce values used. The nonce value is a case sensitive string.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub nonce: Option<String>,
|
||||
pub email: String,
|
||||
}
|
||||
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
pub struct CustomIdTokenClaims {
|
||||
auth_time: u64,
|
||||
email: String,
|
||||
}
|
||||
|
||||
impl IdToken {
|
||||
@ -42,7 +44,8 @@ impl IdToken {
|
||||
jwt_id: None,
|
||||
nonce: self.nonce,
|
||||
custom: CustomIdTokenClaims {
|
||||
auth_time: self.auth_time
|
||||
auth_time: self.auth_time,
|
||||
email: self.email,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user