mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Commit for server test
This commit is contained in:
@@ -4,6 +4,7 @@ import { ShibbConstants } from '../../../+login-page/shibbolethTargetPage/const/
|
|||||||
export class AuthMethodModel {
|
export class AuthMethodModel {
|
||||||
authMethodType: AuthMethodType;
|
authMethodType: AuthMethodType;
|
||||||
location?: string;
|
location?: string;
|
||||||
|
isStandalonePage?: any;
|
||||||
|
|
||||||
constructor(authMethodName: string, location?: string) {
|
constructor(authMethodName: string, location?: string) {
|
||||||
switch (authMethodName) {
|
switch (authMethodName) {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<ds-loading *ngIf="(loading | async) || (isAuthenticated | async)" class="m-5"></ds-loading>
|
<ds-loading *ngIf="(loading | async) || (isAuthenticated | async)" class="m-5"></ds-loading>
|
||||||
<div *ngIf="!(loading | async) && !(isAuthenticated | async)" class="form-login px-4 py-3">
|
<div *ngIf="!(loading | async) && !(isAuthenticated | async)" class="form-login px-4 py-3">
|
||||||
<ng-container *ngFor="let authMethodModel of injectedAuthMethods">
|
<ng-container *ngFor="let authMethodModel of (authMethodData | async)">
|
||||||
<ds-login-container
|
<ds-login-container
|
||||||
[authMethodModel]="authMethodModel"></ds-login-container>
|
[authMethodModel]="authMethodModel"></ds-login-container>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
@@ -5,7 +5,7 @@ import { select, Store } from '@ngrx/store';
|
|||||||
import { getAuthenticationMethods, isAuthenticated, isAuthenticationLoading } from '../../core/auth/selectors';
|
import { getAuthenticationMethods, isAuthenticated, isAuthenticationLoading } from '../../core/auth/selectors';
|
||||||
import { CoreState } from '../../core/core.reducers';
|
import { CoreState } from '../../core/core.reducers';
|
||||||
import { InjectedAuthMethodModel } from './injectedAuthMethodModel/injectedAuthMethodModel';
|
import { InjectedAuthMethodModel } from './injectedAuthMethodModel/injectedAuthMethodModel';
|
||||||
import { filter, takeWhile } from 'rxjs/operators';
|
import { filter, takeWhile, tap } from 'rxjs/operators';
|
||||||
import { AuthService } from '../../core/auth/auth.service';
|
import { AuthService } from '../../core/auth/auth.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -51,8 +51,20 @@ export class LogInComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.authMethodData = this.store.pipe(select(getAuthenticationMethods));
|
/* this.store.pipe(
|
||||||
|
select(getAuthenticationMethods),
|
||||||
|
tap((authMethods) => console.log('authMethods: ', authMethods))
|
||||||
|
).subscribe(
|
||||||
|
(authMethods) => this.authMethodData = authMethods
|
||||||
|
);*/
|
||||||
|
|
||||||
|
this.authMethodData = this.store.pipe(
|
||||||
|
select(getAuthenticationMethods),
|
||||||
|
/* tap((authMethods) => authMethods.forEach((method) => {
|
||||||
|
method.isStandalonePage = this.isStandalonePage;
|
||||||
|
}))*/
|
||||||
|
);
|
||||||
|
/*
|
||||||
this.subscription = this.authMethodData.subscribe((methods) => this.authMethods = methods);
|
this.subscription = this.authMethodData.subscribe((methods) => this.authMethods = methods);
|
||||||
this.injectedAuthMethods = new Array<InjectedAuthMethodModel>();
|
this.injectedAuthMethods = new Array<InjectedAuthMethodModel>();
|
||||||
// tslint:disable-next-line:forin
|
// tslint:disable-next-line:forin
|
||||||
@@ -61,6 +73,7 @@ export class LogInComponent implements OnInit, OnDestroy {
|
|||||||
this.injectedAuthMethods.push(injectedAuthMethod);
|
this.injectedAuthMethods.push(injectedAuthMethod);
|
||||||
}
|
}
|
||||||
console.log('injectedAuthMethods in ngOnInit(): ', this.injectedAuthMethods);
|
console.log('injectedAuthMethods in ngOnInit(): ', this.injectedAuthMethods);
|
||||||
|
*/
|
||||||
|
|
||||||
// set loading
|
// set loading
|
||||||
this.loading = this.store.pipe(select(isAuthenticationLoading));
|
this.loading = this.store.pipe(select(isAuthenticationLoading));
|
||||||
@@ -81,7 +94,7 @@ export class LogInComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy(): void {
|
ngOnDestroy(): void {
|
||||||
this.subscription.unsubscribe();
|
// this.subscription.unsubscribe();
|
||||||
this.alive = false;
|
this.alive = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user