elemental-lowcode

Elemental lowcode development platform.

View the Project on GitHub PhilipSkinner/elemental-lowcode

Back to Services

Identity Management Service

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.

registerUser

Parameters:

Creates 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) => {
				...
			});
		}
	}
};

getUser

Parameters:

Fetches 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) => {
				...
			});
		}
	}
};

updateUser

Parameters:

Updates 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) => {
				...
			});
		}
	}
};