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) createDataAccessRule(rule, roles)
Creates a new data access rule.
Parameters:
| Name | Type | Description |
|---|---|---|
rule |
String | The rule in the form ' |
roles |
Array.<String> | The roles to allow access to rule |
- Source:
Throws:
Error if request fails
(async) createRole(role)
Creates a new role.
Parameters:
| Name | Type | Description |
|---|---|---|
role |
String | The name of the role to be created |
- 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) deleteDataAccessRule(rule)
Deletes an existing data access rule.
Parameters:
| Name | Type | Description |
|---|---|---|
rule |
String | The rule to be deleted, like ' |
- Source:
Throws:
Error if request fails
(async) deleteRole(role)
Deletes an existing role.
Parameters:
| Name | Type | Description |
|---|---|---|
role |
String | The name of the role to be deleted |
- Source:
Throws:
Error if request fails
(async) deleteUser(username)
Deletes an existing user.
Parameters:
| Name | Type | Description |
|---|---|---|
username |
String | The name of the user to be deleted |
- Source:
Throws:
Error if request fails
(async) getAllAccessRules() → {Object}
Returns all data access rules registered in GeoServer.
- Source:
Throws:
Error if request fails
Returns:
An object with all data access rules like { "*.*.r": ["ADMIN", "GROUP_ADMIN"] }
- Type
- Object
(async) getAllRoles() → {Object}
Returns all roles registered in GeoServer.
- Source:
Throws:
Error if request fails
Returns:
An object with all roles like { "roles": ["ADMIN", "GROUP_ADMIN"] }
- Type
- Object
(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