@8base/api-token-auth-client
Advanced tools
Comparing version 1.3.2 to 1.4.0
@@ -13,2 +13,3 @@ import { IAuthState, IAuthClient, IStorageOptions } from '@8base/utils'; | ||
getState(): IAuthState; | ||
getTokenInfo(): unknown; | ||
setState(state: IAuthState): void; | ||
@@ -15,0 +16,0 @@ purgeState(): void; |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const utils_1 = require("@8base/utils"); | ||
const jwt_decode_1 = __importDefault(require("jwt-decode")); | ||
/** | ||
@@ -18,2 +22,8 @@ * Creates instacne of the api token auth client | ||
} | ||
getTokenInfo() { | ||
if (!this.apiToken) { | ||
return undefined; | ||
} | ||
return jwt_decode_1.default(this.apiToken) || undefined; | ||
} | ||
setState(state) { | ||
@@ -20,0 +30,0 @@ this.storageAPI.setState(Object.assign({}, state, { token: this.apiToken })); |
{ | ||
"name": "@8base/api-token-auth-client", | ||
"version": "1.3.2", | ||
"version": "1.4.0", | ||
"author": "8base", | ||
@@ -15,3 +15,4 @@ "repository": "https://github.com/8base/sdk", | ||
"dependencies": { | ||
"@8base/utils": "^1.3.2" | ||
"@8base/utils": "^1.4.0", | ||
"jwt-decode": "^3.0.0-beta.2" | ||
}, | ||
@@ -18,0 +19,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6898
73
2
+ Addedjwt-decode@^3.0.0-beta.2
+ Addedjwt-decode@3.1.2(transitive)
Updated@8base/utils@^1.4.0