diff --git a/projects/common/src/fm/components/user-menu/user-menu.component.html b/projects/common/src/fm/components/user-menu/user-menu.component.html index 50fc52d..e1ed13e 100644 --- a/projects/common/src/fm/components/user-menu/user-menu.component.html +++ b/projects/common/src/fm/components/user-menu/user-menu.component.html @@ -5,6 +5,9 @@
{{user.name}}
+
+ Provider {{provider}} +
logout
diff --git a/projects/common/src/fm/components/user-menu/user-menu.component.ts b/projects/common/src/fm/components/user-menu/user-menu.component.ts index 2e9adb5..4b3565b 100644 --- a/projects/common/src/fm/components/user-menu/user-menu.component.ts +++ b/projects/common/src/fm/components/user-menu/user-menu.component.ts @@ -20,11 +20,14 @@ export class UserMenuComponent implements OnInit { ngOnInit(): void { } - getLetter():string { - if (this.user && this.user.firstName && this.user.lastName) - return this.user.firstName.substr(0,1).toUpperCase() + - this.user.lastName.substr(0,1).toUpperCase(); - return this.user && this.user.name ? this.user.name.substr(0,1).toUpperCase():""; + getProvider():string | null { + const ownedClaims = this.oauthService.getIdentityClaims(); + if(ownedClaims) { + if (ownedClaims["idp"] != "local") { + return ownedClaims["idp"]; + } + } + return null; } logout(event:MouseEvent) {