From 39fd0252527bf30a3d26a2046a3a5c2ae9daa1c7 Mon Sep 17 00:00:00 2001 From: Julius Gruber Date: Thu, 27 Jun 2019 09:56:58 +0200 Subject: [PATCH] Added spinner to shibboleth landing page --- .../+login-page/shibboleth/shibboleth.component.html | 6 ++++-- src/app/+login-page/shibboleth/shibboleth.component.ts | 10 +++++++++- src/app/core/auth/auth.interceptor.ts | 3 +-- src/app/shared/log-in/log-in.component.html | 10 +++++----- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/src/app/+login-page/shibboleth/shibboleth.component.html b/src/app/+login-page/shibboleth/shibboleth.component.html index 12007d03d0..1c23d1edd0 100644 --- a/src/app/+login-page/shibboleth/shibboleth.component.html +++ b/src/app/+login-page/shibboleth/shibboleth.component.html @@ -1,3 +1,5 @@ -

+ + + diff --git a/src/app/+login-page/shibboleth/shibboleth.component.ts b/src/app/+login-page/shibboleth/shibboleth.component.ts index f386f9c5ea..c02287339a 100644 --- a/src/app/+login-page/shibboleth/shibboleth.component.ts +++ b/src/app/+login-page/shibboleth/shibboleth.component.ts @@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core'; import {GetJWTafterShibbLoginAction} from '../../core/auth/auth.actions'; import {Store} from '@ngrx/store'; import {CoreState} from '../../core/core.reducers'; +import {Observable, of} from 'rxjs'; @Component({ selector: 'ds-shibboleth-page', @@ -10,10 +11,17 @@ import {CoreState} from '../../core/core.reducers'; }) export class ShibbolethComponent implements OnInit { - constructor( private store: Store,) { } + /** + * True if the authentication is loading. + * @type {boolean} + */ + public loading: Observable; ngOnInit() { + this.loading = of(true); this.store.dispatch(new GetJWTafterShibbLoginAction()); } + constructor( private store: Store,) { } + } diff --git a/src/app/core/auth/auth.interceptor.ts b/src/app/core/auth/auth.interceptor.ts index 806ebc6a6b..994d39f33a 100644 --- a/src/app/core/auth/auth.interceptor.ts +++ b/src/app/core/auth/auth.interceptor.ts @@ -56,7 +56,6 @@ export class AuthInterceptor implements HttpInterceptor { private isLoginResponse(http: HttpRequest | HttpResponseBase): boolean { return http.url && http.url.endsWith('/authn/login') - /*|| http.url.endsWith('/shibboleth');*/ } private isLogoutResponse(http: HttpRequest | HttpResponseBase): boolean { @@ -67,7 +66,7 @@ export class AuthInterceptor implements HttpInterceptor { const authStatus = new AuthStatus(); authStatus.id = null; authStatus.okay = true; - authStatus.ssoLoginUrl = location; // this line was added while developing shibboleth dev + authStatus.ssoLoginUrl = location; // this line was added while developing shibboleth login if (authenticated) { authStatus.authenticated = true; authStatus.token = new AuthTokenInfo(accessToken); diff --git a/src/app/shared/log-in/log-in.component.html b/src/app/shared/log-in/log-in.component.html index 6757274a21..7046eb3a7e 100644 --- a/src/app/shared/log-in/log-in.component.html +++ b/src/app/shared/log-in/log-in.component.html @@ -25,6 +25,7 @@ +

@@ -32,14 +33,13 @@ role="button">{{"login.form.ssoLogin" | translate}}
- - +