1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-11-20 12:02:22 +03:00

Do not expose error type from mas-keystore in mas-oidc-client

The mas-keystore crate is an optional dependency so
setting "default-features" to false
results in a compilation error.

Since the enum is exhaustive, the corresponding error variant
cannot be behind a cargo feature.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
Kévin Commaille
2024-03-12 12:01:31 +01:00
committed by Quentin Gliech
parent 5d85d0fb65
commit 39a6132ea8
2 changed files with 6 additions and 4 deletions

View File

@@ -24,7 +24,6 @@ use mas_jose::{
jwa::InvalidAlgorithm,
jwt::{JwtDecodeError, JwtSignatureError, NoKeyWorked},
};
use mas_keystore::WrongAlgorithmError;
use oauth2_types::{
errors::ClientErrorCode, oidc::ProviderMetadataVerificationError, pkce::CodeChallengeError,
};
@@ -693,8 +692,8 @@ pub enum CredentialsError {
JwtClaims(#[from] ClaimError),
/// The key found cannot be used with the algorithm.
#[error(transparent)]
JwtWrongAlgorithm(#[from] WrongAlgorithmError),
#[error("Wrong algorithm for key")]
JwtWrongAlgorithm,
/// An error occurred when signing the JWT.
#[error(transparent)]