Skip to content

Commit 98a8b67

Browse files
Set correct audience for ClientAuthentication via private_key_jwt according to OIDC spec
https://openid.net/specs/openid-connect-core-1_0.html#ClientAuthentication
1 parent 28eb410 commit 98a8b67

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/jwt-client-authentication/src/main/java/demo/jwtclientauth/JwtClientAuthApp.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ CommandLineRunner cli() {
6363
var clientJwtPayload = Map.<String, Object>ofEntries( //
6464
Map.entry("iss", clientId), //
6565
Map.entry("sub", clientId), //
66-
Map.entry("aud", issuer), //
66+
Map.entry("aud", issuer + "/protocol/openid-connect/token"), // see: https://openid.net/specs/openid-connect-core-1_0.html#ClientAuthentication
6767
Map.entry("iat", issuedAt.getEpochSecond()), //
6868
Map.entry("exp", issuedAt.plus(tokenLifeTime).getEpochSecond()), //
6969
Map.entry("jti", UUID.randomUUID().toString()) //

0 commit comments

Comments
 (0)