IrisJS

Namespace: user

user

Methods

(static) getRole(userid, callback)

Fetch the roles that a user has given their userid.

Parameters:
Name Type Description
userid string

The userid

callback function

The callback which is run with the user's roles as its first argument

Source:

(static) login(auth, res, callback)

Login a user given a login object (containing username and password)

Parameters:
Name Type Description
auth object

Auth object consisting of key-value pairs username and password

res object

Express response object

callback function

Callback which is run with the userid of the logged in user (if successful) as its first argument, or, if unsuccessful, an error message

Source: