-
Notifications
You must be signed in to change notification settings - Fork 3
Service: User Group List (System Admin)
Lists user-groups by username and user-group status. If username is not specified, user-groups of all users will be listed. If status is not specified, user-groups of all statuses will be listed.
This service is restricted only for system management purposes and only allowed for system admins. It requires admin authentication either by using Authorization header or including an admin token in the request body. At server starts-up, Kustvakt automatically generates an adminToken file at the root project folder, if it has not existed already.
Available in: full version
Method: POST
Service URL: root/admin/group/list
Header Parameter
Name | Required | Authentication scheme | Value |
---|---|---|---|
Content-Type | yes | content type of the input data | application/x-www-form-urlencoded |
Authorization | yes, if adminToken is not included, see Form Parameters below | HTTP authentication with scheme: Bearer | OAuth2 access token |
Form Parameters
Name | Required | Description | Type | Value |
---|---|---|---|---|
username | no | a username | String | |
status | no | user-group status | UserGroupStatus | ACTIVE, DELETED, HIDDEN |
token | yes, if authorization header is not included | The adminToken automatically generated by Kustvakt server in the root folder | String |
Request with admin token
curl -H 'Content-Type: application/x-www-form-urlencoded' -d @adminToken http://localhost:8089/api/v1.0/admin/group/list?username=pearl&status=HIDDEN'
Request with authorization header
curl -H 'Content-Type: application/x-www-form-urlencoded' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9' 'http://localhost:8089/api/v1.0/admin/group/list?username=pearl&status=HIDDEN'
Request with Basic authentication (for testing only)
Username (admin) and password (password) are encoded in Base64 as the basic token.
Retrieve user-groups with status HIDDEN that belong to a user with username: pearl
curl -H 'Content-Type: application/x-www-form-urlencoded' -H 'Authorization: Basic YWRtaW46cGFzc3dvcmQ=' 'http://localhost:8089/api/v1.0/admin/group/list?username=pearl&status=HIDDEN'
Response
[{ "id": 3, "name": "auto group", "owner": "system", "status": "HIDDEN", "members": [{ "userId": "pearl", "status": "ACTIVE", "roles": ["VC_ACCESS_MEMBER"] }], "userMemberStatus": null, "userRoles": null }]
User in userMemberStatus
and userRoles
refers to the user requesting the service. In this case, the user is the system admin. Since he/she is not a member of the user-group, the values of userMemberStatus
and userRoles
are null.
- Importing Kustvakt to Eclipse
- Installing Lombok
- Setting annotation processors
- Setting a test environment
- HTTP Basic Authentication
- OAuth2 authorization scopes
- OAuth2 authorization request
- OAuth2 token request
- OAuth2 token revocation
- OAuth2 client registration
- OAuth2 client info
- OAuth2 client deregistration
- OAuth2 client secret reset
- Plugin registration
- Plugin list (marketplace)
- Plugin installation
- Plugin uninstallation
- Installed plugin list
- VC creation and update
- VC deletion
- VC list
- VC info
- VC KoralQuery
- VC statistics
- VC statistics with KoralQuery