Elemental lowcode development platform.
The identity management (idm) service allows you to manage users held within the identity provider. You can call the following methods on this service:
These methods are covered in more detail below.
Parameters:
user
- object, contains the username and password for the new userauthToken
- string, the access token to use to access the API optionalCreates a new user on the identity provider.
This can be called from your controllers like so:
module.exports = {
events : {
load : (event) => {
return this.idmService.registerUser({
username : "dave",
password : "davidson"
}).then((newUser) => {
...
}).catch((err) => {
...
});
}
}
};
Parameters:
username
- string, username of the user to fetchauthToken
- string, the access token to use to access the API optionalFetches the user from the identity provider.
This can be called from your controllers like so:
module.exports = {
events : {
load : (event) => {
return this.idmService.getUser("dave").then((user) => {
...
}).catch((err) => {
...
});
}
}
};
Parameters:
username
- string, the username of the user to updatepassword
- string, the password to set on the user, set to null to leave unchangedclaims
- object, an object that contains all of the claims for the userUpdates a users entry in the identity provider.
This can be called from your controllers like so:
module.exports = {
events : {
changePassword : (event) => {
return this.idmService.updateUser(event.bag.username, event.bag.password, {}).then(() => {
...
}).catch((err) => {
...
});
}
}
};