Extended test cases to validate the use of additionalScopes
Signed-off-by: Daniel Doberenz <daniel.doberenz@lichtblick.de>
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user