Skip to content

Commit

Permalink
Merge b1e42de into eb07abb
Browse files Browse the repository at this point in the history
  • Loading branch information
Laura Tebben committed Sep 25, 2019
2 parents eb07abb + b1e42de commit 90d849c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/OpenIDConfigurationResource.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
const constants = require('./constants');

class OpenIdConfigurationResource {
async init({discoveryEndpoint, requestHandler}){
this.openIdConfig = await requestHandler(discoveryEndpoint);
this.publicKeys = requestHandler(this.getJwksEndpoint());
const headers = { 'x-filter-type': `spa:v${constants.VERSION}` };
this.publicKeys = requestHandler(this.getJwksEndpoint(), { headers: headers });
}

getAuthorizationEndpoint() {
Expand All @@ -28,4 +31,5 @@ class OpenIdConfigurationResource {
return await this.publicKeys;
}
}
module.exports = OpenIdConfigurationResource;
module.exports = OpenIdConfigurationResource;

0 comments on commit 90d849c

Please sign in to comment.