Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
feat(authService): add getExp()
Browse files Browse the repository at this point in the history
  • Loading branch information
doktordirk committed Jun 1, 2016
1 parent f5056ce commit 026d0d8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ authService
.getTokenPayload(): string
// get the token ttl if available
.getTtl(): Number
// get the token exp if available
.getExp(): Number
```
Additionally, you can use `AuthFilterValueConverter` and `AuthorizeStep` for UI feedback.
Expand Down
9 changes: 9 additions & 0 deletions src/authService.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,15 @@ export class AuthService {
return authenticated;
}

/**
* Gets ttl in seconds
*
* @returns {Number} ttl for JWT tokens, NaN for all other tokens
*/
getExp() {
return this.authentication.getExp();
}

/**
* Gets ttl in seconds
*
Expand Down

0 comments on commit 026d0d8

Please sign in to comment.