Skip to content

Instantly share code, notes, and snippets.

@ramindu90
ramindu90 / config.toml
Last active November 14, 2022 04:35
Config of Choreo Connect to deploy when WSO2 API Manager as control plane
[adapter]
[enforcer.security]
[[enforcer.security.tokenService]]
# changed localhost to host.docker.internal
issuer = "https://host.docker.internal:9444/oauth2/token"
[[enforcer.security.tokenService]]
# changed localhost to host.docker.internal
issuer = "https://host.docker.internal:9444/publisher"
@ramindu90
ramindu90 / Auth0userRoleRule.js
Created February 8, 2022 16:23
Set roles to a user script in Auth0
function setRolesToUser(user, context, callback) {
// Roles should only be set to verified users.
if (!user.email || !user.email_verified) {
return callback(null, user, context);
}
user.app_metadata = user.app_metadata || {};
// You can add a Role based on what you want
// In this case I check domain
const addRolesToUser = function (user) {