mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[ADF-4810] fix sso settings (#5108)
* fix sso settings * fix test * update-js-api * update-js-api * invert test order for some reason
This commit is contained in:
@@ -29,30 +29,6 @@ describe('Login component - SSO', () => {
|
|||||||
const silentLogin = false;
|
const silentLogin = false;
|
||||||
let implicitFlow;
|
let implicitFlow;
|
||||||
|
|
||||||
describe('Login component - SSO Grant type password (implicit flow false)', () => {
|
|
||||||
|
|
||||||
it('[C299158] Should be possible to login with SSO, with grant type password (Implicit Flow false)', async () => {
|
|
||||||
implicitFlow = false;
|
|
||||||
await settingsPage.setProviderEcmSso(browser.params.testConfig.adf_acs.host,
|
|
||||||
browser.params.testConfig.adf.hostSso,
|
|
||||||
browser.params.testConfig.adf.hostIdentity, silentLogin, implicitFlow, browser.params.config.oauth2.clientId);
|
|
||||||
|
|
||||||
await loginPage.waitForElements();
|
|
||||||
|
|
||||||
await settingsPage.setProviderEcmSso(browser.params.testConfig.adf_acs.host,
|
|
||||||
browser.params.testConfig.adf.hostSso,
|
|
||||||
browser.params.testConfig.adf.hostIdentity, silentLogin, implicitFlow, browser.params.config.oauth2.clientId);
|
|
||||||
browser.ignoreSynchronization = true;
|
|
||||||
|
|
||||||
await loginPage.enterUsername(browser.params.testConfig.adf.adminEmail);
|
|
||||||
await loginPage.enterPassword(browser.params.testConfig.adf.adminPassword);
|
|
||||||
await loginPage.clickSignInButton();
|
|
||||||
|
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(loginPage.sidenavLayout);
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('Login component - SSO implicit Flow', () => {
|
describe('Login component - SSO implicit Flow', () => {
|
||||||
|
|
||||||
afterEach(async () => {
|
afterEach(async () => {
|
||||||
@@ -79,4 +55,22 @@ describe('Login component - SSO', () => {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('Login component - SSO Grant type password (implicit flow false)', () => {
|
||||||
|
|
||||||
|
it('[C299158] Should be possible to login with SSO, with grant type password (Implicit Flow false)', async () => {
|
||||||
|
implicitFlow = false;
|
||||||
|
await settingsPage.setProviderEcmSso(browser.params.testConfig.adf_acs.host,
|
||||||
|
browser.params.testConfig.adf.hostSso,
|
||||||
|
browser.params.testConfig.adf.hostIdentity, silentLogin, implicitFlow, browser.params.config.oauth2.clientId);
|
||||||
|
|
||||||
|
await loginPage.waitForElements();
|
||||||
|
|
||||||
|
await loginPage.enterUsername(browser.params.testConfig.adf.adminEmail);
|
||||||
|
await loginPage.enterPassword(browser.params.testConfig.adf.adminPassword);
|
||||||
|
await loginPage.clickSignInButton();
|
||||||
|
|
||||||
|
await BrowserVisibility.waitUntilElementIsVisible(loginPage.sidenavLayout);
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -158,7 +158,8 @@
|
|||||||
"REDIRECT_LOGOUT": "Redirect URI Logout",
|
"REDIRECT_LOGOUT": "Redirect URI Logout",
|
||||||
"SILENT": "Silent Login",
|
"SILENT": "Silent Login",
|
||||||
"SCOPE": "Scope",
|
"SCOPE": "Scope",
|
||||||
"CLIENT": "Client ID"
|
"CLIENT": "Client ID",
|
||||||
|
"PUBLIC_URLS" : "Public urls silent Login"
|
||||||
},
|
},
|
||||||
"CARDVIEW": {
|
"CARDVIEW": {
|
||||||
"KEYVALUEPAIRS": {
|
"KEYVALUEPAIRS": {
|
||||||
|
|||||||
@@ -128,6 +128,13 @@
|
|||||||
<input id="logout-url" matInput placeholder="{{ 'CORE.HOST_SETTINGS.REDIRECT_LOGOUT'| translate }}"
|
<input id="logout-url" matInput placeholder="{{ 'CORE.HOST_SETTINGS.REDIRECT_LOGOUT'| translate }}"
|
||||||
name="redirectUriLogout" formControlName="redirectUriLogout">
|
name="redirectUriLogout" formControlName="redirectUriLogout">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field class="adf-full-width" floatLabel="Public Urls">
|
||||||
|
<mat-label>{{ 'CORE.HOST_SETTINGS.PUBLIC_URLS'| translate }}</mat-label>
|
||||||
|
<input id="public-url" matInput placeholder="{{ 'CORE.HOST_SETTINGS.PUBLIC_URLS'| translate }}"
|
||||||
|
name="publicUrls" formControlName="publicUrls">
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<mat-card-actions class="adf-actions">
|
<mat-card-actions class="adf-actions">
|
||||||
|
|||||||
@@ -147,7 +147,8 @@ export class HostSettingsComponent implements OnInit {
|
|||||||
scope: [oauth.scope, Validators.required],
|
scope: [oauth.scope, Validators.required],
|
||||||
secret: oauth.secret,
|
secret: oauth.secret,
|
||||||
silentLogin: oauth.silentLogin,
|
silentLogin: oauth.silentLogin,
|
||||||
implicitFlow: oauth.implicitFlow
|
implicitFlow: oauth.implicitFlow,
|
||||||
|
publicUrls: [oauth.publicUrls]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -269,6 +270,10 @@ export class HostSettingsComponent implements OnInit {
|
|||||||
return this.oauthConfig.get('redirectUri');
|
return this.oauthConfig.get('redirectUri');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get publicUrls(): AbstractControl {
|
||||||
|
return this.oauthConfig.get('publicUrls');
|
||||||
|
}
|
||||||
|
|
||||||
get redirectUriLogout(): AbstractControl {
|
get redirectUriLogout(): AbstractControl {
|
||||||
return this.oauthConfig.get('redirectUriLogout');
|
return this.oauthConfig.get('redirectUriLogout');
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+107
-404
File diff suppressed because it is too large
Load Diff
+2
-1
@@ -74,6 +74,7 @@
|
|||||||
"process services-cloud"
|
"process services-cloud"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@alfresco/adf-cli": "3.5.0-7ebd28772876fa4144c347fd4fca956a27bce493",
|
||||||
"@alfresco/adf-content-services": "3.4.0",
|
"@alfresco/adf-content-services": "3.4.0",
|
||||||
"@alfresco/adf-core": "3.4.0",
|
"@alfresco/adf-core": "3.4.0",
|
||||||
"@alfresco/adf-extensions": "3.4.0",
|
"@alfresco/adf-extensions": "3.4.0",
|
||||||
@@ -81,7 +82,7 @@
|
|||||||
"@alfresco/adf-process-services": "3.4.0",
|
"@alfresco/adf-process-services": "3.4.0",
|
||||||
"@alfresco/adf-process-services-cloud": "3.4.0",
|
"@alfresco/adf-process-services-cloud": "3.4.0",
|
||||||
"@alfresco/adf-testing": "3.4.0",
|
"@alfresco/adf-testing": "3.4.0",
|
||||||
"@alfresco/js-api": "3.5.0-ad32604b4aa8abd17291d58bb77a989ac57fdbb6",
|
"@alfresco/js-api": "3.5.0-00a7b1b556070818a4c689ae63aa21e0b6e26f9f",
|
||||||
"@angular/animations": "^7.2.15",
|
"@angular/animations": "^7.2.15",
|
||||||
"@angular/cdk": "7.3.7",
|
"@angular/cdk": "7.3.7",
|
||||||
"@angular/common": "^7.2.15",
|
"@angular/common": "^7.2.15",
|
||||||
|
|||||||
Reference in New Issue
Block a user