Extended test cases to validate the use of additionalScopes

Signed-off-by: Daniel Doberenz <daniel.doberenz@lichtblick.de>
This commit is contained in:
Daniel Doberenz
2023-11-23 10:10:37 +01:00
parent 6ecec4282b
commit ab8ad0f983
2 changed files with 3 additions and 1 deletions
@@ -113,6 +113,7 @@ describe('microsoftAuthenticator', () => {
tenantId: 'tenantId',
clientId: 'clientId',
clientSecret: 'clientSecret',
additionalScopes: ['User.Read.All'],
}),
});
});
@@ -38,6 +38,7 @@ describe('authModuleMicrosoftProvider', () => {
clientId: 'my-client-id',
clientSecret: 'my-client-secret',
tenantId: 'my-tenant-id',
additionalScopes: ['User.Read.All'],
},
},
},
@@ -66,7 +67,7 @@ describe('authModuleMicrosoftProvider', () => {
expect(startUrl.pathname).toBe('/my-tenant-id/oauth2/v2.0/authorize');
expect(Object.fromEntries(startUrl.searchParams)).toEqual({
response_type: 'code',
scope: 'user.read',
scope: 'user.read User.Read.All',
client_id: 'my-client-id',
redirect_uri: `http://localhost:${server.port()}/api/auth/microsoft/handler/frame`,
state: expect.any(String),