Created
June 15, 2016 15:38
-
-
Save gillesdemey/72aa9bf3159b791105e462d2e05cc955 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// get tokens for provider from user (profile) | |
function getTokens (provider, profile) { | |
var tenant = options.globalSettings.HOARD_TENANT | |
var secret = options.globalSettings.HOARD_SECRET | |
var jwt_token = jwt.sign({ sub: profile, iss: tenant }, secret) | |
return request(`https://auth.waylay.io/tokens/${provider}`, { | |
headers: { 'authorization': jwt_token } | |
}) | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment