You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OIDC has a nonce mechanism that gets included in the JWT to prevent replay attacks.
Comparing it after decoding isn't particularly difficult, but neither would be checking the issuer or audience.
It still might be useful to integrate it as part of the decode-and-validate step. This could maybe done be similarly to the set_required_spec_claims method, with a set_expected_claim_values.
The downside is that it forces a new Validation object to be allocated on every request because the nonce changes every time.
fnprocess_token(raw_token:&str,nonce:&str) -> Result<Decoded>{letmut val = Validation::default();/// ...
val.set_expected_claim_values(HashMap::from([("nonce", nonce)]))decode::<Claims>(raw_token,todo!(),&val)}
The text was updated successfully, but these errors were encountered:
OIDC
has anonce
mechanism that gets included in the JWT to prevent replay attacks.Comparing it after decoding isn't particularly difficult, but neither would be checking the issuer or audience.
It still might be useful to integrate it as part of the decode-and-validate step. This could maybe done be similarly to the
set_required_spec_claims
method, with aset_expected_claim_values
.The downside is that it forces a new
Validation
object to be allocated on every request because the nonce changes every time.The text was updated successfully, but these errors were encountered: