Commit for server test

This commit is contained in:
Julius Gruber
2019-10-16 13:14:24 +02:00
parent 331596968b
commit a59aafb1f4
3 changed files with 26 additions and 12 deletions

View File

@@ -4,6 +4,7 @@ import { ShibbConstants } from '../../../+login-page/shibbolethTargetPage/const/
export class AuthMethodModel {
authMethodType: AuthMethodType;
location?: string;
isStandalonePage?: any;
constructor(authMethodName: string, location?: string) {
switch (authMethodName) {

View File

@@ -1,6 +1,6 @@
<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">
<ng-container *ngFor="let authMethodModel of injectedAuthMethods">
<ng-container *ngFor="let authMethodModel of (authMethodData | async)">
<ds-login-container
[authMethodModel]="authMethodModel"></ds-login-container>
</ng-container>

View File

@@ -5,7 +5,7 @@ import { select, Store } from '@ngrx/store';
import { getAuthenticationMethods, isAuthenticated, isAuthenticationLoading } from '../../core/auth/selectors';
import { CoreState } from '../../core/core.reducers';
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';
@Component({
@@ -51,8 +51,20 @@ export class LogInComponent implements OnInit, OnDestroy {
}
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.injectedAuthMethods = new Array<InjectedAuthMethodModel>();
// tslint:disable-next-line:forin
@@ -61,6 +73,7 @@ export class LogInComponent implements OnInit, OnDestroy {
this.injectedAuthMethods.push(injectedAuthMethod);
}
console.log('injectedAuthMethods in ngOnInit(): ', this.injectedAuthMethods);
*/
// set loading
this.loading = this.store.pipe(select(isAuthenticationLoading));
@@ -81,7 +94,7 @@ export class LogInComponent implements OnInit, OnDestroy {
}
ngOnDestroy(): void {
this.subscription.unsubscribe();
// this.subscription.unsubscribe();
this.alive = false;
}