• Parses a base64-encoded jwt

    Parameters

    • jwt: string

      JWT encoded as base64 string

    Returns JwtUtils.JWT

    const jwtString = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c';
    parseAccessToken(jstString);
    // => {
    header:
    {
    'alg': 'HS256',
    'typ': 'JWT'
    },
    payload:
    {
    'sub': '1234567890',
    'name': 'John Doe',
    'iat': 1516239022
    },
    signature: 'SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c'
    }