Skip to content

Commit

Permalink
fix: add azp claim in auth_code flow only
Browse files Browse the repository at this point in the history
* fixes #752

Co-authored-by: tronghn <[email protected]>
Co-authored-by: kimtore <[email protected]>
  • Loading branch information
3 people committed Oct 30, 2024
1 parent 933ea62 commit 5aa7bdb
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ open class DefaultOAuth2TokenCallback
"tid" to issuerId,
).apply {
putAll(claims)
put("azp", tokenRequest.clientIdAsString())
if (tokenRequest.grantType() == GrantType.AUTHORIZATION_CODE) {
put("azp", tokenRequest.clientIdAsString())
}
}

override fun tokenExpiry(): Long = expiry
Expand Down

0 comments on commit 5aa7bdb

Please sign in to comment.