Methods
(async) addRole(role) → {String}
add a role
Parameters:
Name | Type | Description |
---|---|---|
role |
String | role representation |
Returns:
- name of created role
- Type
- String
(async) addRoleForUser(userId, roles) → {Object}
add roles to a specified user
Parameters:
Name | Type | Description |
---|---|---|
userId |
String | the id of the user |
roles |
Array | array of role representations for the user |
Returns:
- id of the user
- Type
- Object
(async) addShare(share) → {Object}
add a new share
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
share |
Object | the new share object Properties
|
Returns:
- new share object
- Type
- Object
(async) addUser(user) → {String}
add a new user to the realm
Parameters:
Name | Type | Description |
---|---|---|
user |
Object | representation of a user, MUST additionally contain key "password" with temporary password for user |
Returns:
- id of created user
- Type
- String
(async) deleteRoleById(roleId) → {String}
delete an existing role
Parameters:
Name | Type | Description |
---|---|---|
roleId |
String | the id of the existing role |
Returns:
- id of deleted role
- Type
- String
(async) deleteRoleFromUser(userId, roles) → {Object}
remove a role of a specified user
Parameters:
Name | Type | Description |
---|---|---|
userId |
String | the id of the user |
roles |
Array | array of role representations |
Returns:
- id of the user
- Type
- Object
(async) deleteShareById(shareId) → {String}
delete an existing share
Parameters:
Name | Type | Description |
---|---|---|
shareId |
String | the id of a share object |
Returns:
- id of deleted share object
- Type
- String
(async) deleteUser(userId) → {String}
delete a user
Parameters:
Name | Type | Description |
---|---|---|
userId |
String | the id of the user |
Returns:
- id of deleted user
- Type
- String
(async) getAllUsers() → {Array}
get all users from authorization server
Returns:
- array of user representations
- Type
- Array
(async) getGroupsFromUser(userId) → {Array}
get the groups from a user
Parameters:
Name | Type | Description |
---|---|---|
userId |
String | the id of the user |
Returns:
- array of group representations
- Type
- Array
(async) getResources() → {Array}
get all resources
Returns:
- all resources
- Type
- Array
(async) getRoleById(roleId) → {Object}
get the detailled role information of a role
Parameters:
Name | Type | Description |
---|---|---|
roleId |
String | the id of the role |
Returns:
- role representation
- Type
- Object
(async) getRoles(name) → {Object|Array}
get role representation if name is set, otherwise returns all roles
Parameters:
Name | Type | Default | Description |
---|---|---|---|
name |
String | null | name of role |
Returns:
- role representation or array of role representations
- Type
- Object | Array
(async) getRolesFromUser(userId) → {Array}
get the roles from a user
Parameters:
Name | Type | Description |
---|---|---|
userId |
String | the id of the user |
Returns:
- array of role representations
- Type
- Array
(async) getShareById(shareId) → {Object}
get a share by id
Parameters:
Name | Type | Description |
---|---|---|
shareId |
String | the id of of a share object |
Returns:
- share object
- Type
- Object
(async) getShares(query) → {Array}
get all shares (user, group and link sharings)
Parameters:
Name | Type | Description |
---|---|---|
query |
String | query string to filter shares - available query string are resourceId (id of a resource), resourceType (type of a resource e.g. Process), shareType (type of a share e.g. 0 = user sharing), userId (id of a user) |
Returns:
- shares array
- Type
- Array
(async) getUserById(userId) → {Object}
get the detailled user representation
Parameters:
Name | Type | Description |
---|---|---|
userId |
String | the id of the user |
Returns:
- user representation
- Type
- Object
(async) updatePassword(userId, password) → {String}
updates password of a user
Parameters:
Name | Type | Description |
---|---|---|
userId |
String | the id of the user |
password |
String | new password for user |
Returns:
- id of updated user
- Type
- String
(async) updateRoleById(roleId, role) → {String}
update an existing role
Parameters:
Name | Type | Description |
---|---|---|
roleId |
String | the id of the existing role |
role |
Object | updated role representation |
Returns:
- id of updated role
- Type
- String
(async) updateShareById(shareId, share) → {Object}
update an existing share
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
shareId |
String | the id of a share object |
|||||||||||||||
share |
Object | the updated share object properties Properties
|
Returns:
- updated share object
- Type
- Object
(async) updateUser(userId, user) → {String}
update a specified user
Parameters:
Name | Type | Description |
---|---|---|
userId |
String | the id of the user |
user |
Object | updated representation of a user |
Returns:
- id of updated user
- Type
- String