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

Multiple IANA codegen enhancement

- JWS/JWE algorithms are properly splitted
 - Enums now have a proper description
 - They implement FromStr and Display
 - mas-jose does not reexport mas-iana anymore
This commit is contained in:
Quentin Gliech
2022-01-12 10:58:27 +01:00
parent d9b1ef3ded
commit 2844706bb1
21 changed files with 401 additions and 497 deletions

View File

@@ -21,9 +21,10 @@ use headers::{CacheControl, Pragma};
use hyper::StatusCode;
use mas_config::{OAuth2ClientConfig, OAuth2Config};
use mas_data_model::{AuthorizationGrantStage, TokenType};
use mas_iana::jose::JsonWebSignatureAlg;
use mas_jose::{
claims::{AT_HASH, AUD, AUTH_TIME, C_HASH, EXP, IAT, ISS, NONCE, SUB},
DecodedJsonWebToken, JsonWebSignatureAlgorithm, SigningKeystore, StaticKeystore,
DecodedJsonWebToken, SigningKeystore, StaticKeystore,
};
use mas_storage::{
oauth2::{
@@ -288,7 +289,7 @@ async fn authorization_code_grant(
.wrap_error()?;
let header = key_store
.prepare_header(JsonWebSignatureAlgorithm::Rs256)
.prepare_header(JsonWebSignatureAlg::Rs256)
.await
.wrap_error()?;
let id_token = DecodedJsonWebToken::new(header, claims);