Skip to content

Instantly share code, notes, and snippets.

@alx-andru
Last active November 4, 2018 01:38
Show Gist options
  • Save alx-andru/948120bb87873b555da7890d8340dd8e to your computer and use it in GitHub Desktop.
Save alx-andru/948120bb87873b555da7890d8340dd8e to your computer and use it in GitHub Desktop.
Modified HomeComponent to test token interceptor
...
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