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