1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-21 18:53:29 +00:00

get premium status from token

This commit is contained in:
Kyle Spearrin
2017-07-11 14:54:36 -04:00
parent 1053491d28
commit 94a13954a5
2 changed files with 12 additions and 2 deletions

View File

@@ -254,6 +254,16 @@ function initTokenService() {
return decoded.name;
};
TokenService.prototype.getPremium = function () {
var decoded = this.decodeToken();
if (typeof decoded.premium === 'undefined') {
return false;
}
return !!decoded.premium;
};
TokenService.prototype.getIssuer = function () {
var decoded = this.decodeToken();