Skip to content

Commit

Permalink
shell-ui: Add a getIdToken method on the navbar element to allow sync…
Browse files Browse the repository at this point in the history
…hronization of elements mounted after the navbar
  • Loading branch information
JBWatenbergScality committed Apr 14, 2021
1 parent d1615b0 commit 0625ea3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions shell-ui/src/navbar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,9 @@ class SolutionsNavbarWebComponent extends reactToWebComponent(
this.logOut = (providerLogout?: boolean) => {
logOut(window.userManager, providerLogout);
};
this.getIdToken = () => {
return (window.userManager: UserManager).getUser().then(user => user.id_token);
}

this.dispatchEvent(new CustomEvent('ready', {detail: {version}}));
}
Expand Down

0 comments on commit 0625ea3

Please sign in to comment.