Skip to content

Commit 0b05217

Browse files
committed
refactor: jwt client authentication audience is now an issuer identifier string
If needed this can be reverted using the `extras.clientAssertionPayload` option.
1 parent e7380c0 commit 0b05217

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/helpers/client.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,17 +92,14 @@ async function authFor(endpoint, { clientAssertionPayload } = {}) {
9292
case 'private_key_jwt':
9393
case 'client_secret_jwt': {
9494
const timestamp = now();
95-
const audience = [
96-
...new Set([this.issuer.issuer, this.issuer.token_endpoint].filter(Boolean)),
97-
];
9895

9996
const assertion = await clientAssertion.call(this, endpoint, {
10097
iat: timestamp,
10198
exp: timestamp + 60,
10299
jti: random(),
103100
iss: this.client_id,
104101
sub: this.client_id,
105-
aud: audience,
102+
aud: this.issuer.issuer,
106103
...clientAssertionPayload,
107104
});
108105

0 commit comments

Comments
 (0)