module.exports.extractTokenData = function()

in source/shared-modules/token-manager/token-manager.js [44:57]


module.exports.extractTokenData = function(req) {
    var tokenData;
    var bearerToken = req.get('Authorization');
    if (bearerToken) {
        bearerToken = bearerToken.substring(bearerToken.indexOf(' ') + 1);
        var decodedIdToken = jwtDecode(bearerToken);
        if (decodedIdToken){
            tokenData.TenantID = decodedIdToken['custom:tenant_id'];
            //Add Other Mappings Below
            //others such as sub, and non pii information
        }
    }
    return tokenData;
}