Skip to content

Instantly share code, notes, and snippets.

@MrPrashantT
Created March 22, 2018 22:54
Show Gist options
  • Save MrPrashantT/d1fae183c7e114edb69869309d5c91fc to your computer and use it in GitHub Desktop.
Save MrPrashantT/d1fae183c7e114edb69869309d5c91fc to your computer and use it in GitHub Desktop.
set OIDC conformant flag on context object
function (user, context, callback) {
var oidcConformantClients = ['client_id_1', 'client_id_2']; //oidc conformant clients
var isOidcConformantClient = oidcConformantClients.some(
function (clientId) {
return context.clientID === clientId;
});
if (isOidcConformantClient) {
context.isOidcConformant = true;
} else {
context.isOidcConformant = false;
}
return callback(null, user, context);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment