1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-07-29 22:01:14 +03:00

Make the error on introspection failure more explicit in the logs

This commit is contained in:
Quentin Gliech
2023-09-13 18:15:23 +02:00
parent 2cfcc26c8b
commit 9a77f67fbe
2 changed files with 135 additions and 53 deletions

View File

@ -191,6 +191,17 @@ pub enum TokenType {
CompatRefreshToken,
}
impl std::fmt::Display for TokenType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
TokenType::AccessToken => write!(f, "access token"),
TokenType::RefreshToken => write!(f, "refresh token"),
TokenType::CompatAccessToken => write!(f, "compat access token"),
TokenType::CompatRefreshToken => write!(f, "compat refresh token"),
}
}
}
impl TokenType {
fn prefix(self) -> &'static str {
match self {