[HLRC] Add support for get roles API (#35787)

This commits adds support for the Get Roles API to the HLRC

Relates: #29827
This commit is contained in:
Ioannis Kakavas 2018-11-26 11:25:07 +02:00 committed by GitHub
parent dfd93deabe
commit 8daa854f90
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 676 additions and 53 deletions

View file

@ -0,0 +1,48 @@
--
:api: get-roles
:request: GetRolesRequest
:respnse: GetRolesResponse
--
[id="{upid}-{api}"]
=== Get Roles API
[id="{upid}-{api}-request"]
==== Get Roles Request
Retrieving a role can be performed using the `security().getRoles()`
method and by setting the role name on +{request}+:
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-request]
--------------------------------------------------
Retrieving multiple roles can be performed using the `security().getRoles()`
method and by setting multiple role names on +{request}+:
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-list-request]
--------------------------------------------------
Retrieving all roles can be performed using the `security().getRoles()`
method without specifying any role names on +{request}+:
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-all-request]
--------------------------------------------------
include::../execution.asciidoc[]
[id="{upid}-{api}-response"]
==== Get Roles Response
The returned +{response}+ allows getting information about the retrieved roles as follows.
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-response]
--------------------------------------------------

View file

@ -366,6 +366,7 @@ The Java High Level REST Client supports the following Security APIs:
* <<java-rest-high-security-enable-user>>
* <<java-rest-high-security-disable-user>>
* <<java-rest-high-security-change-password>>
* <<{upid}-get-roles>>
* <<java-rest-high-security-delete-role>>
* <<{upid}-clear-roles-cache>>
* <<{upid}-clear-realm-cache>>