Skip to content

Commit

Permalink
adding some test console logs
Browse files Browse the repository at this point in the history
  • Loading branch information
damienbod committed Jul 4, 2020
1 parent 2a42e49 commit e64fdcf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions projects/sample-code-flow/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ export class AppComponent implements OnInit {
ngOnInit() {
this.oidcSecurityService.checkAuthIncludingServer().subscribe((isAuthenticated) => {
console.warn('app authenticated', isAuthenticated);
const at = this.oidcSecurityService.getToken();
console.warn(at);
});
}
}
1 change: 1 addition & 0 deletions projects/sample-code-flow/src/app/home/home.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<div *ngIf="isAuthenticated$ | async as isAuthenticated; else noAuth">
<button (click)="logout()">Logout</button>
<button (click)="forceRefreshSession()">RefreshSession</button>
<hr />

<br />
Expand Down
3 changes: 3 additions & 0 deletions projects/sample-code-flow/src/app/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ export class HomeComponent implements OnInit {
this.oidcSecurityService.authorize();
}

forceRefreshSession() {
this.oidcSecurityService.forceRefreshSession().subscribe((result) => console.warn(result));
}
logout() {
this.oidcSecurityService.logoff();
}
Expand Down

0 comments on commit e64fdcf

Please sign in to comment.