mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[ACS-10592] Remove 'secret' field from OAUTH config across ADF/ACA/ADW (#11332)
This commit is contained in:
@@ -1535,9 +1535,6 @@
|
||||
"type": "string",
|
||||
"description": "The client's id as registered with the auth server"
|
||||
},
|
||||
"secret": {
|
||||
"type": "string"
|
||||
},
|
||||
"redirectUri": {
|
||||
"type": "string",
|
||||
"description": "The client's redirectUri as registered with the auth server"
|
||||
|
||||
@@ -23,7 +23,6 @@ export interface OauthConfigModel {
|
||||
codeFlow?: boolean;
|
||||
redirectUri: string;
|
||||
silentLogin?: boolean;
|
||||
secret?: string;
|
||||
redirectUriLogout?: string;
|
||||
logoutUrl?: string;
|
||||
audience?: string;
|
||||
|
||||
@@ -31,7 +31,6 @@ describe('AuthConfigService', () => {
|
||||
host: 'http://localhost:3000/auth/realms/alfresco',
|
||||
clientId: 'fakeClientId',
|
||||
scope: 'openid profile email',
|
||||
secret: '',
|
||||
implicitFlow: true,
|
||||
silentLogin: true,
|
||||
redirectSilentIframeUri: 'http://localhost:3000/assets/silent-refresh.html',
|
||||
@@ -44,7 +43,6 @@ describe('AuthConfigService', () => {
|
||||
host: 'http://localhost:3000/auth/realms/alfresco',
|
||||
clientId: 'fakeClientId',
|
||||
scope: 'openid profile email',
|
||||
secret: '',
|
||||
implicitFlow: true,
|
||||
silentLogin: true,
|
||||
redirectSilentIframeUri: 'http://localhost:3000/subfolder/assets/silent-refresh.html',
|
||||
@@ -57,7 +55,6 @@ describe('AuthConfigService', () => {
|
||||
host: 'http://localhost:3000/auth/realms/alfresco',
|
||||
clientId: 'fakeClientId',
|
||||
scope: 'openid profile email',
|
||||
secret: '',
|
||||
implicitFlow: true,
|
||||
silentLogin: true,
|
||||
redirectSilentIframeUri: 'http://localhost:3000/subfolder2/assets/silent-refresh.html',
|
||||
@@ -70,7 +67,6 @@ describe('AuthConfigService', () => {
|
||||
host: 'http://localhost:3000/auth/realms/alfresco',
|
||||
clientId: 'fakeClientId',
|
||||
scope: 'openid profile email',
|
||||
secret: '',
|
||||
implicitFlow: true,
|
||||
silentLogin: true,
|
||||
redirectSilentIframeUri: 'http://localhost:3000/assets/silent-refresh.html',
|
||||
@@ -83,7 +79,6 @@ describe('AuthConfigService', () => {
|
||||
host: 'http://localhost:3000/auth/realms/alfresco',
|
||||
clientId: 'fakeClientId',
|
||||
scope: 'openid profile email',
|
||||
secret: '',
|
||||
implicitFlow: false,
|
||||
codeFlow: true,
|
||||
silentLogin: true,
|
||||
@@ -116,7 +111,7 @@ describe('AuthConfigService', () => {
|
||||
postLogoutRedirectUri: 'http://localhost:3000/#/logout',
|
||||
clientId: 'fakeClientId',
|
||||
scope: 'openid profile email',
|
||||
dummyClientSecret: ''
|
||||
dummyClientSecret: 'dummyClientSecret'
|
||||
};
|
||||
|
||||
expect(await service.loadConfig()).toEqual(jasmine.objectContaining(expectedConfig));
|
||||
@@ -133,7 +128,7 @@ describe('AuthConfigService', () => {
|
||||
clientId: 'fakeClientId',
|
||||
scope: 'openid profile email',
|
||||
responseType: 'code',
|
||||
dummyClientSecret: ''
|
||||
dummyClientSecret: 'dummyClientSecret'
|
||||
};
|
||||
|
||||
expect(await service.loadConfig()).toEqual(jasmine.objectContaining(expectedConfig));
|
||||
@@ -180,7 +175,6 @@ describe('AuthConfigService', () => {
|
||||
host: 'http://localhost:3000/auth/realms/alfresco',
|
||||
clientId: 'fakeClientId',
|
||||
scope: 'openid profile email',
|
||||
secret: '',
|
||||
implicitFlow: true,
|
||||
silentLogin: true,
|
||||
redirectSilentIframeUri: 'http://localhost:3000/assets/silent-refresh.html',
|
||||
|
||||
@@ -69,7 +69,7 @@ export class AuthConfigService {
|
||||
postLogoutRedirectUri: this.generatePostLogoutUri(origin, oauth2.redirectUriLogout),
|
||||
clientId: oauth2.clientId,
|
||||
scope: oauth2.scope,
|
||||
dummyClientSecret: oauth2.secret || '',
|
||||
dummyClientSecret: 'dummyClientSecret',
|
||||
logoutUrl: oauth2.logoutUrl,
|
||||
customQueryParams,
|
||||
...(oauth2.codeFlow && { responseType: 'code' }),
|
||||
|
||||
Reference in New Issue
Block a user