Skip to content

Commit 189ed07

Browse files
committed
add metadata service as property
1 parent 988e8f7 commit 189ed07

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

src/OidcClient.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ export default class OidcClient {
3333
return this._settings;
3434
}
3535

36+
37+
get metadataService() {
38+
return this._metadataService;
39+
}
40+
3641
createSigninRequest({
3742
response_type, scope, redirect_uri, data,
3843
prompt, display, max_age, ui_locales, id_token_hint, login_hint, acr_values}={},

test/unit/OidcClient.spec.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,17 @@ describe("OidcClient", function() {
8181

8282
});
8383

84-
describe("createSigninRequest", function() {
84+
describe("metadataService", function () {
8585

86-
it("should return a promise", function() {
86+
it("should be MetadataService", function () {
87+
subject.metadataService.should.be.equal(stubMetadataService);
88+
});
89+
90+
});
91+
92+
describe("createSigninRequest", function () {
93+
94+
it("should return a promise", function () {
8795
stubMetadataService.getAuthorizationEndpointResult = Promise.resolve("http://sts/authorize");
8896
subject.createSigninRequest().should.be.instanceof(Promise);
8997
});

0 commit comments

Comments
 (0)