You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by an...@apache.org on 2019/09/26 13:20:43 UTC
[incubator-dlab] branch DLAB-terraform updated: redirect on login
fixes
This is an automated email from the ASF dual-hosted git repository.
ankovalyshyn pushed a commit to branch DLAB-terraform
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/DLAB-terraform by this push:
new b4afc6b redirect on login fixes
new 7624a1b Merge branch 'DLAB-terraform' of github.com:apache/incubator-dlab into DLAB-terraform
b4afc6b is described below
commit b4afc6b6a3d5f439b7405b04ab0f73adeba69f50
Author: Andriana Kovalyshyn <An...@epam.com>
AuthorDate: Thu Sep 26 16:20:16 2019 +0300
redirect on login fixes
---
.../webapp/src/app/core/services/applicationSecurity.service.ts | 2 +-
.../webapp/src/app/core/services/applicationServiceFacade.service.ts | 2 +-
.../main/resources/webapp/src/app/core/services/authorization.guard.ts | 2 +-
.../main/resources/webapp/src/app/core/services/checkParams.guard.ts | 2 +-
.../src/main/resources/webapp/src/app/login/login.component.ts | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/applicationSecurity.service.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/applicationSecurity.service.ts
index a0f7997..c6b161c 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/services/applicationSecurity.service.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/services/applicationSecurity.service.ts
@@ -50,7 +50,7 @@ export class ApplicationSecurityService {
return this.serviceFacade.buildLocationCheck()
.pipe(
map(response => response),
- catchError(ErrorUtils.handleServiceError));
+ catchError(error => error));
}
public login(loginModel: LoginModel): Observable<boolean | {}> {
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/applicationServiceFacade.service.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/applicationServiceFacade.service.ts
index af6d28b..52bfb54 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/services/applicationServiceFacade.service.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/services/applicationServiceFacade.service.ts
@@ -111,7 +111,7 @@ export class ApplicationServiceFacade {
return this.buildRequest(HTTPMethod.GET,
this.requestRegistry.Item(ApplicationServiceFacade.OAUTH),
null,
- { observe: 'response' });
+ { responseType: 'text' });
}
public buildGetAuthToken(body: any): Observable<any> {
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/authorization.guard.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/authorization.guard.ts
index 4662a3c..93c0fbb 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/services/authorization.guard.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/services/authorization.guard.ts
@@ -34,7 +34,7 @@ export class AuthorizationGuard implements CanActivate {
return this.applicationSecurityService.isLoggedIn().pipe(
map(authState => {
if (!authState)
- this.applicationSecurityService.locationCheck().subscribe(location => window.location.href = location.headers.get('Location'));
+ this.applicationSecurityService.locationCheck().subscribe(location => window.location.href = location);
return !!authState;
})
);
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/checkParams.guard.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/checkParams.guard.ts
index 6f0b4f1..cc3032d 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/services/checkParams.guard.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/services/checkParams.guard.ts
@@ -51,7 +51,7 @@ export class CheckParamsGuard implements CanActivate {
.toPromise();
}
if (!authState)
- this.applicationSecurityService.locationCheck().subscribe(location => window.location.href = location.headers.get('Location'));
+ this.applicationSecurityService.locationCheck().subscribe(location => window.location.href = location);
return !!authState;
}));
}
diff --git a/services/self-service/src/main/resources/webapp/src/app/login/login.component.ts b/services/self-service/src/main/resources/webapp/src/app/login/login.component.ts
index 96d6503..64314c6 100644
--- a/services/self-service/src/main/resources/webapp/src/app/login/login.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/login/login.component.ts
@@ -81,7 +81,7 @@ export class LoginComponent implements OnInit, OnDestroy {
}
loginWithKeyClock() {
- this.applicationSecurityService.locationCheck().subscribe(location => window.location.href = location.headers.get('Location'));
+ this.applicationSecurityService.locationCheck().subscribe(location => window.location.href = location);
}
checkHealthStatusAndRedirect(isLoggedIn) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org