new module:SecurityClient(url, auth)
Creates a GeoServer REST SecurityClient instance.
Parameters:
Name | Type | Description |
---|---|---|
url |
String | The URL of the GeoServer REST API endpoint |
auth |
String | The Basic Authentication string |
- Source:
Methods
(async) associateUserRole(username, role)
Associates the given role to the user.
Parameters:
Name | Type | Description |
---|---|---|
username |
String | The name of the user to add the role to |
role |
String | The role to associate |
- Source:
Throws:
Error if request fails
(async) createUser(username, password)
Creates a new user.
Parameters:
Name | Type | Description |
---|---|---|
username |
String | The name of the user to be created |
password |
String | The password of the user to be created |
- Source:
Throws:
Error if request fails
(async) getAllUsers() → {Object}
Returns all users registered in GeoServer.
- Source:
Throws:
Error if request fails
Returns:
An object with all users
- Type
- Object
(async) updateUser(username, password, enabled)
Updates an existing user. User name is only taken for identification and
cannot be changed with this API call.
Parameters:
Name | Type | Description |
---|---|---|
username |
String | The name of the user to be created |
password |
String | The password of the user to be created |
enabled |
Boolean | Enable / disable the user |
- Source:
Throws:
Error if request fails