1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-08-09 04:22:45 +03:00

Split the asymmetric and symmetric keys enums

This commit is contained in:
Quentin Gliech
2022-09-01 14:49:58 +02:00
parent 4e94584a4a
commit a70032c8e1
12 changed files with 617 additions and 747 deletions

View File

@@ -136,7 +136,7 @@ impl Credentials {
.await
.map_err(|_| CredentialsVerificationError::JwksFetchFailed)?;
jwt.verify_from_jwks(&jwks)
jwt.verify_with_jwks(&jwks)
.map_err(|_| CredentialsVerificationError::InvalidAssertionSignature)?;
}
@@ -154,7 +154,7 @@ impl Credentials {
.decrypt_string(encrypted_client_secret)
.map_err(|_e| CredentialsVerificationError::DecryptionError)?;
jwt.verify_from_shared_secret(decrypted_client_secret)
jwt.verify_with_shared_secret(decrypted_client_secret)
.map_err(|_| CredentialsVerificationError::InvalidAssertionSignature)?;
}
@@ -570,7 +570,7 @@ mod tests {
};
assert_eq!(client_id, "client-id");
jwt.verify_from_shared_secret(b"client-secret".to_vec())
jwt.verify_with_shared_secret(b"client-secret".to_vec())
.unwrap();
}
}