Skip to content
Snippets Groups Projects
Commit d95fdafc authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FEAT #13695 TIME 0:05 remove test

parent 4223a9ea
No related branches found
No related tags found
No related merge requests found
...@@ -109,24 +109,23 @@ export class LoginComponent implements OnInit { ...@@ -109,24 +109,23 @@ export class LoginComponent implements OnInit {
this.http.get('../rest/authenticationInformations').pipe( this.http.get('../rest/authenticationInformations').pipe(
tap((data: any) => { tap((data: any) => {
this.authService.setAppSession(data.instanceId); this.authService.setAppSession(data.instanceId);
// this.authService.authMode = data.connection;
this.authService.changeKey = data.changeKey; this.authService.changeKey = data.changeKey;
this.applicationName = data.applicationName; this.applicationName = data.applicationName;
this.loginMessage = data.loginMessage; this.loginMessage = data.loginMessage;
this.authService.setEvent('authenticationInformations'); this.authService.setEvent('authenticationInformations');
this.authService.authMode = data.authMode;
// FOR TEST this.authService.authUri = data.authUri;
this.authService.authMode = 'cas';
this.authService.authUrl = 'https://10.2.95.72:8443/cas-server-webapp-4.0.0/login?service=http://localhost/maarch_courrier_develop/cs_recette/dist/index.html#/login';
if (['cas', 'keycloak'].indexOf(this.authService.authMode) > -1) { if (['cas', 'keycloak'].indexOf(this.authService.authMode) > -1) {
this.loginForm.disable(); this.loginForm.disable();
this.loginForm.setValidators(null); this.loginForm.setValidators(null);
const regex = /ticket=[.]*/g; const regex = /ticket=[.]*/g;
if (window.location.search.match(regex) !== null) { if (window.location.search.match(regex) !== null) {
this.onSubmit(window.location.search.substring(1, window.location.search.length)); const ssoToken = window.location.search.substring(1, window.location.search.length);
window.location.search = '';
this.onSubmit(ssoToken);
} else { } else {
window.location.href = this.authService.authUrl; window.location.href = this.authService.authUri;
} }
} }
}), }),
......
...@@ -12,7 +12,7 @@ import { Observable, Subject } from 'rxjs'; ...@@ -12,7 +12,7 @@ import { Observable, Subject } from 'rxjs';
export class AuthService { export class AuthService {
authMode: string = 'default'; authMode: string = 'default';
authUrl: string = ''; authUri: string = '';
changeKey: boolean = null; changeKey: boolean = null;
user: any = {}; user: any = {};
private eventAction = new Subject<any>(); private eventAction = new Subject<any>();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment