Add debug logging for user claims in auth.service.ts methods.
This commit is contained in:
parent
c25364caf7
commit
f968a64dd4
|
|
@ -64,6 +64,7 @@ export class AuthService {
|
||||||
}
|
}
|
||||||
|
|
||||||
const claims = this.extractJwtClaims(jwt);
|
const claims = this.extractJwtClaims(jwt);
|
||||||
|
console.log("User claims: ", claims);
|
||||||
this.userClaimsSubject.next(claims);
|
this.userClaimsSubject.next(claims);
|
||||||
this.isAuthenticatedSubject.next(true);
|
this.isAuthenticatedSubject.next(true);
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -88,6 +89,7 @@ export class AuthService {
|
||||||
localStorage.setItem('jwt', jwt);
|
localStorage.setItem('jwt', jwt);
|
||||||
|
|
||||||
const claims = this.extractJwtClaims(jwt);
|
const claims = this.extractJwtClaims(jwt);
|
||||||
|
console.log("User claims: ", claims);
|
||||||
this.userClaimsSubject.next(claims);
|
this.userClaimsSubject.next(claims);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -103,6 +105,7 @@ export class AuthService {
|
||||||
*/
|
*/
|
||||||
public getUserAuthorizations(): string[] {
|
public getUserAuthorizations(): string[] {
|
||||||
const claims = this.userClaimsSubject.getValue();
|
const claims = this.userClaimsSubject.getValue();
|
||||||
|
console.log("User claims: ", claims);
|
||||||
return claims?.authorizations || [];
|
return claims?.authorizations || [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user