use more future proof config for static clients (#11175)
This commit is contained in:
parent
ce332d0f8b
commit
90e65e8490
5 changed files with 24 additions and 13 deletions
|
@ -27,7 +27,9 @@ describe("getOidcClientId()", () => {
|
|||
const baseUrl = "https://just.testing";
|
||||
const dynamicClientId = "xyz789";
|
||||
const staticOidcClients = {
|
||||
[issuer]: "abc123",
|
||||
[issuer]: {
|
||||
client_id: "abc123",
|
||||
},
|
||||
};
|
||||
const delegatedAuthConfig = {
|
||||
issuer,
|
||||
|
@ -42,9 +44,7 @@ describe("getOidcClientId()", () => {
|
|||
});
|
||||
|
||||
it("should return static clientId when configured", async () => {
|
||||
expect(await getOidcClientId(delegatedAuthConfig, clientName, baseUrl, staticOidcClients)).toEqual(
|
||||
staticOidcClients[issuer],
|
||||
);
|
||||
expect(await getOidcClientId(delegatedAuthConfig, clientName, baseUrl, staticOidcClients)).toEqual("abc123");
|
||||
// didn't try to register
|
||||
expect(fetchMockJest).toHaveFetchedTimes(0);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue