corbel-token-verifier
v0.0.5
Published
A corbel token verifier for JavaScript
Downloads
7
Readme
Corbel Token Verifier
Usage
npm install --save corbel-token-verifier
var tokenVerifier = require('corbel-token-verifier');
var myToken = 'Bearer AxssdasAS....SDA331';
var tokenObject = tokenVerifier(myToken);
if(tokenObject){
//Is a valid token
}
API methods
- tokenObject.isUser()
- tokenObject.isClient()
- tokenObject.isRefreshToken()
- tokenObject.getUserId()
- tokenObject.getClientId()
- tokenObject.getDeviceId()
- tokenObject.getDomainId()
- tokenObject.hasExpired()
- tokenObject.getExpireTime()
- tokenObject.getInfo()