Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function makeRevokeTokenRequest(configuration, refreshToken) {
if(idpConfig.revokeAuthenticationRequired === false) {
var request = new RevokeTokenRequest(refreshToken, 'refresh_token');
} else {
var request = new RevokeTokenRequest(refreshToken, 'refresh_token', idpConfig.clientId, idpConfig.clientSecret);
}
return tokenHandler.performRevokeTokenRequest(configuration, request).then(response => {
logger.info('revoked refreshToken', {category: 'openid-connect'});
return response;
});
}
function makeRevokeTokenRequest(configuration, refreshToken) {
if(idpConfig.revokeAuthenticationRequired === false) {
var request = new RevokeTokenRequest(refreshToken, 'refresh_token');
} else {
var request = new RevokeTokenRequest(refreshToken, 'refresh_token', idpConfig.clientId, idpConfig.clientSecret);
}
return tokenHandler.performRevokeTokenRequest(configuration, request).then(response => {
logger.info('revoked refreshToken', {category: 'openid-connect'});
return response;
});
}