Skip to content

Commit

Permalink
fix: change request objects typ to oauth-authz-req+jwt (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
nanderstabel authored Dec 10, 2024
1 parent 23facd4 commit ef23077
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions siopv2/src/relying_party.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@ impl RelyingParty {
authorization_request: &AuthorizationRequest<Object<E>>,
signing_algorithm: impl TryInto<Algorithm>,
) -> Result<String> {
let mut header = Header::new(
signing_algorithm
.try_into()
.map_err(|_| anyhow::anyhow!("Invalid signing algorithm."))?,
);
header.typ = Some("oauth-authz-req+jwt".to_string());
jwt::encode(
self.subject.clone(),
Header::new(
signing_algorithm
.try_into()
.map_err(|_| anyhow::anyhow!("Invalid signing algorithm."))?,
),
header,
authorization_request,
&self.default_subject_syntax_type.to_string(),
)
Expand Down

0 comments on commit ef23077

Please sign in to comment.