You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-08-07 17:03:01 +03:00
Add equality claim validator
This commit is contained in:
committed by
Quentin Gliech
parent
db25574a96
commit
a2a3b3954e
@@ -22,7 +22,7 @@ use chrono::Duration;
|
||||
use mas_iana::oauth::{
|
||||
OAuthAccessTokenType, OAuthClientAuthenticationMethod, PkceCodeChallengeMethod,
|
||||
};
|
||||
use mas_jose::jwk::PublicJsonWebKeySet;
|
||||
use mas_jose::{claims::ClaimError, jwk::PublicJsonWebKeySet};
|
||||
use mas_oidc_client::{
|
||||
error::{
|
||||
AuthorizationError, IdTokenError, PushedAuthorizationError, TokenAuthorizationCodeError,
|
||||
@@ -358,7 +358,13 @@ async fn fail_access_token_with_authorization_code_wrong_nonce() {
|
||||
.await
|
||||
.unwrap_err();
|
||||
|
||||
assert_matches!(error, TokenAuthorizationCodeError::WrongNonce);
|
||||
assert_matches!(
|
||||
error,
|
||||
TokenAuthorizationCodeError::IdToken(IdTokenError::Claim(ClaimError::ValidationError {
|
||||
claim: "nonce",
|
||||
..
|
||||
}))
|
||||
);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
Reference in New Issue
Block a user