|
|
|
@ -1,6 +1,5 @@ |
|
|
|
import { AuthService } from '@abp/ng.core'; |
|
|
|
import { Component } from '@angular/core'; |
|
|
|
import { OAuthService } from 'angular-oauth2-oidc'; |
|
|
|
|
|
|
|
@Component({ |
|
|
|
selector: 'app-home', |
|
|
|
@ -9,10 +8,10 @@ import { OAuthService } from 'angular-oauth2-oidc'; |
|
|
|
}) |
|
|
|
export class HomeComponent { |
|
|
|
get hasLoggedIn(): boolean { |
|
|
|
return this.oAuthService.hasValidAccessToken(); |
|
|
|
return this.authService.isAuthenticated; |
|
|
|
} |
|
|
|
|
|
|
|
constructor(private oAuthService: OAuthService, private authService: AuthService) {} |
|
|
|
constructor(private authService: AuthService) {} |
|
|
|
|
|
|
|
login() { |
|
|
|
this.authService.navigateToLogin(); |
|
|
|
|