UNPKG

@authress/sdk

Version:

Client SDK for Authress authorization as a service. Provides managed authorization api to secure service resources including user data.

14 lines (11 loc) 250 B
const base64url = require('base64url'); class JwtManager { decode(token) { try { return token && JSON.parse(base64url.decode(token.split('.')[1])); } catch (error) { return null; } } } module.exports = new JwtManager();