This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "info": { | |
| "name": "Roles and Permissions Mgmgt API v2", | |
| "_postman_id": "2073276d-fae4-6190-6158-5aa87d79fd80", | |
| "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" | |
| }, | |
| "item": [ | |
| { | |
| "name": "Get Roles", | |
| "request": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var fs = require('fs'); | |
| var file = fs.readFileSync('path to file containing custom hosted login page', "utf8"); | |
| var client_id = '<client_id_of_app>'; | |
| var client_data = {}; | |
| client_data.custom_login_page = file; | |
| client_data.custom_login_page_preview = file; | |
| var tools = require('auth0-extension-tools'); | |
| tools.managementApi.getClient({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var request = require("request"); | |
| //1. get the user_id of the user | |
| var user_id = '<user_id>' | |
| //Use the client id and secret of your app registered with Auth0 from the management console | |
| var client_id='<client_id>'; | |
| var client_secret = '<client_secret>'; | |
| var tenant_domain = 'tenant.auth0.com'; //sample - this is your tenant domain | |
| //2. User your clientid and secret to get an access token for making the API calls -> This token lasts for 24 hrs so you should store it as opposed to getting a new 1 each time. For sample I am getting a new token each time. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function login(email, password, callback) { | |
| var ldap = require('ldapjs'); | |
| if (!global.ldapClient) { | |
| // console.log('Global Client not found'); | |
| var client = ldap.createClient({ | |
| url: 'ldap://server:389', | |
| idleTimeout: 30000 | |
| }); | |
| client.bind('uid=admin,ou=system', 'secret', function(err) { |