feat(login): add login authentication and authorization (#122)
Add login basic authentication, oauth2 authentication, two factor authentication and authorization and allow to reset password on expiry. Fixes #117, #118, #119, #120
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Component, OnInit, ChangeDetectorRef } from '@angular/core';
|
||||
import { Component, OnInit, ChangeDetectorRef, OnDestroy } from '@angular/core';
|
||||
import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
@@ -10,7 +10,7 @@ import { ProgressBarService } from '../progress-bar.service';
|
||||
templateUrl: './shell.component.html',
|
||||
styleUrls: ['./shell.component.scss']
|
||||
})
|
||||
export class ShellComponent implements OnInit {
|
||||
export class ShellComponent implements OnInit, OnDestroy {
|
||||
|
||||
isHandset$: Observable<boolean> = this.breakpointObserver.observe(Breakpoints.Handset)
|
||||
.pipe(
|
||||
@@ -18,6 +18,7 @@ export class ShellComponent implements OnInit {
|
||||
);
|
||||
sidenavCollapsed = false;
|
||||
progressBarMode: string;
|
||||
progressBar$: any;
|
||||
|
||||
constructor(private breakpointObserver: BreakpointObserver,
|
||||
private progressBarService: ProgressBarService,
|
||||
@@ -25,7 +26,7 @@ export class ShellComponent implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
this.sidenavCollapsed = true;
|
||||
this.progressBarService.updateProgressBar.subscribe((mode: string) => {
|
||||
this.progressBar$ = this.progressBarService.updateProgressBar.subscribe((mode: string) => {
|
||||
this.progressBarMode = mode;
|
||||
this.cdr.detectChanges();
|
||||
});
|
||||
@@ -35,4 +36,8 @@ export class ShellComponent implements OnInit {
|
||||
this.sidenavCollapsed = $event;
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.progressBar$.unsubscribe();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ export class ThemeStorageService {
|
||||
}
|
||||
|
||||
clearTheme() {
|
||||
this.localStorage.removeItem(this.themeStorageKey);
|
||||
this.localStorage.removeItemSubscribe(this.themeStorageKey);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user