mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Added spinner to shibboleth landing page
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
<p>
|
||||
|
||||
<ds-loading *ngIf="(loading | async)" message="'Shibboleth log-in successfull. Please wait while we redirect you'" class="m-5"></ds-loading>
|
||||
<!--<p>
|
||||
Shibboleth login successfull! Please wait while we redirect you...
|
||||
</p>
|
||||
</p>-->
|
||||
|
@@ -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<CoreState>,) { }
|
||||
/**
|
||||
* True if the authentication is loading.
|
||||
* @type {boolean}
|
||||
*/
|
||||
public loading: Observable<boolean>;
|
||||
|
||||
ngOnInit() {
|
||||
this.loading = of(true);
|
||||
this.store.dispatch(new GetJWTafterShibbLoginAction());
|
||||
}
|
||||
|
||||
constructor( private store: Store<CoreState>,) { }
|
||||
|
||||
}
|
||||
|
@@ -56,7 +56,6 @@ export class AuthInterceptor implements HttpInterceptor {
|
||||
|
||||
private isLoginResponse(http: HttpRequest<any> | HttpResponseBase): boolean {
|
||||
return http.url && http.url.endsWith('/authn/login')
|
||||
/*|| http.url.endsWith('/shibboleth');*/
|
||||
}
|
||||
|
||||
private isLogoutResponse(http: HttpRequest<any> | 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);
|
||||
|
@@ -25,6 +25,7 @@
|
||||
|
||||
<button class="btn btn-lg btn-primary btn-block mt-3" type="submit"
|
||||
[disabled]="!form.valid">{{"login.form.submit" | translate}}</button>
|
||||
|
||||
<br>
|
||||
<div *ngIf="(hasSsoLoginUrl | async)">
|
||||
<!--<div class="text-center mt-2"><span class="align-middle">{{"login.form.or-divider" | translate}}</span></div>-->
|
||||
@@ -32,14 +33,13 @@
|
||||
role="button">{{"login.form.ssoLogin" | translate}}</a>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div>
|
||||
<br>
|
||||
<a class="btn btn-lg btn-primary btn-block mt-2"
|
||||
<br>
|
||||
<div>
|
||||
<a class="btn btn-lg btn-primary btn-block mt-2"
|
||||
href="https://fis.tiss.tuwien.ac.at/Shibboleth.sso/Login?target=https://fis.tiss.tuwien.ac.at/shibboleth"
|
||||
role="button"
|
||||
>HardCoded Shibb</a>
|
||||
</div>-->
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div >
|
||||
|
Reference in New Issue
Block a user