Skip to content

Instantly share code, notes, and snippets.

@bmonteiro
Last active June 3, 2020 06:12
Show Gist options
  • Save bmonteiro/96c5864900e526e2ca5f7c6f22f09827 to your computer and use it in GitHub Desktop.
Save bmonteiro/96c5864900e526e2ca5f7c6f22f09827 to your computer and use it in GitHub Desktop.
Tyk Virtual Endpoint for Okta Event Hooks (One-Time Verification Request)
function oktaHandler (request, session, config) {
log("X-Okta-Verification-Challenge: " + request.Headers["X-Okta-Verification-Challenge"]);
b = { "verification" : request.Headers["X-Okta-Verification-Challenge"].toString()};
var responseObject = {
Body: JSON.stringify(b),
Code: 200
};
return TykJsResponse(responseObject, session.meta_data);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment