Skip to content

Commit

Permalink
fix: add application/jwk-set+json to accept header for JWKS calls (#467)
Browse files Browse the repository at this point in the history
Closes #466
  • Loading branch information
frederik authored Feb 3, 2022
1 parent 8732257 commit f94d42b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/helpers/issuer.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ async function getKeyStore(reload = false) {
responseType: 'json',
url: this.jwks_uri,
headers: {
Accept: 'application/json',
Accept: 'application/json, application/jwk-set+json',
},
})
.finally(() => {
Expand Down
6 changes: 3 additions & 3 deletions test/client/client_instance.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2513,7 +2513,7 @@ describe('Client', () => {

before(function () {
nock('https://op.example.com')
.matchHeader('Accept', 'application/json')
.matchHeader('Accept', 'application/json, application/jwk-set+json')
.persist()
.get('/certs')
.reply(200, this.keystore.toJWKS());
Expand Down Expand Up @@ -3802,7 +3802,7 @@ describe('Client', () => {

before(function () {
nock('https://op.example.com')
.matchHeader('Accept', 'application/json')
.matchHeader('Accept', 'application/json, application/jwk-set+json')
.get('/certs')
.reply(200, this.keystore.toJWKS());

Expand Down Expand Up @@ -4108,7 +4108,7 @@ describe('Client', () => {

before(function () {
nock('https://op.example.com')
.matchHeader('Accept', 'application/json')
.matchHeader('Accept', 'application/json, application/jwk-set+json')
.get('/certs')
.reply(200, this.keystore.toJWKS());

Expand Down
2 changes: 1 addition & 1 deletion test/issuer/issuer_instance.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('Issuer', () => {

before(function () {
nock('https://op.example.com')
.matchHeader('Accept', 'application/json')
.matchHeader('Accept', 'application/json, application/jwk-set+json')
.get('/certs')
.reply(200, this.keystore.toJWKS());

Expand Down

0 comments on commit f94d42b

Please sign in to comment.