blob: c1d33b938724e4ad59baffbb6d3f97553608b9c5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
import { Component, OnInit } from '@angular/core';
import { AuthService } from '~/app/shared/api/auth.service';
import { Icons } from '~/app/shared/enum/icons.enum';
import { AuthStorageService } from '~/app/shared/services/auth-storage.service';
@Component({
selector: 'cd-identity',
templateUrl: './identity.component.html',
styleUrls: ['./identity.component.scss']
})
export class IdentityComponent implements OnInit {
sso: boolean;
username: string;
icons = Icons;
constructor(private authStorageService: AuthStorageService, private authService: AuthService) {}
ngOnInit() {
this.username = this.authStorageService.getUsername();
this.sso = this.authStorageService.isSSO();
}
logout() {
this.authService.logout();
}
}
|