Skip to content

Commit 5a9bcce

Browse files
committed
add signing keysd
1 parent 614fc54 commit 5a9bcce

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

‎src/OidcClientSettings.js‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@ const OidcMetadataUrlPath = '.well-known/openid-configuration';
33
export default class OidcClientSettings {
44
constructor(settings) {
55
if (!settings) {
6+
Log.error("No settings passed to OidcClientSettings");
67
throw new Error("settings");
78
}
89

910
this._authority = settings.authority;
1011
this._metadataUrl = settings.metadataUrl;
1112
this._metadata = settings.metadata;
13+
this._signingKeys = settings.signingKeys;
1214
}
1315

1416
get authority() {
@@ -36,6 +38,13 @@ export default class OidcClientSettings {
3638
set metadata(value){
3739
this._metadata = value;
3840
}
41+
42+
get signingKeys() {
43+
return this._signingKeys;
44+
}
45+
set signingKeys(value){
46+
this._signingKeys = value;
47+
}
3948

4049
// get isOidc() {
4150
// if (this._settings.response_type) {

‎test/OidcClientSettings.spec.js‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,21 @@ describe("OidcClientSettings", function() {
6767
});
6868

6969
});
70+
71+
describe("signingKeys", function() {
72+
it("should return value from initial settings", function(){
73+
let subject = new OidcClientSettings({
74+
signingKeys:"test"
75+
});
76+
subject.signingKeys.should.equal("test");
77+
});
78+
79+
it("should store value", function(){
80+
let subject = new OidcClientSettings({
81+
});
82+
subject.signingKeys = "test";
83+
subject.signingKeys.should.equal("test");
84+
});
85+
86+
});
7087
});

0 commit comments

Comments
 (0)