You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 5, 2019. It is now read-only.
module.exports = function (refresh, setup, request, url) {
var module = {};
//Some custom ESI stuff because our swagger library oddly doesn't support the verify endpoint - Probably beacuse it's technically part of SSO and not ESI
module.verifyReturnCharacterDetails = function (refreshToken, callback) {
refresh.requestNewAccessToken('provider', refreshToken, function (err, AccessToken, newRefreshToken) {
// Build URL for verify request:
var urlObj = {
protocol: 'https',
host: setup.oauth.baseSSOUrl,
pathname: '/oauth/verify',
}
var ssoVerifyUrl = url.format(urlObj);
// Build the auth header from recently acquired token:
var verifyAuthHeaderString = "Bearer " + AccessToken;
// Set up options for the get request:
var getOptions = {
url: ssoVerifyUrl,
headers: {
"Authorization": verifyAuthHeaderString,
"User-Agent": setup.oauth.userAgent,
}
}
// Send response:
request.get(getOptions, function (err, response, body) {