Last active
November 4, 2018 01:38
-
-
Save alx-andru/948120bb87873b555da7890d8340dd8e to your computer and use it in GitHub Desktop.
Modified HomeComponent to test token interceptor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
export class HomeComponent implements OnInit { | |
userInfo$: Observable<User>; | |
constructor(private http: HttpClient, private oidcFacade: OidcFacade) {} | |
ngOnInit() {} | |
checkUserInfo() { | |
const identityProviderUrl = this.oidcFacade.getOidcClient().settings.authority; | |
this.userInfo$ = this.http.get<User>( | |
`${identityProviderUrl}/connect/userinfo` | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment