public class DefaultKeycloakClient extends Object implements KeycloakClient
CATEGORY, DESCRIPTION, logger, NAME| Constructor and Description |
|---|
DefaultKeycloakClient() |
| Modifier and Type | Method and Description |
|---|---|
URL |
findTokenEndpointURL()
Finds the keycloak endpoint
URL discovering it in the current scope provided by ScopeProvider |
TokenResponse |
queryUMAToken(String clientId,
String clientSecret,
List<String> permissions)
Queries an UMA token from the discovered Keycloak server in the current scope, by using provided clientId and client secret
for the current scope audience (context), in URLEncoded form or not, and optionally a list of permissions.
|
TokenResponse |
queryUMAToken(String clientId,
String clientSecret,
String audience,
List<String> permissions)
Queries an UMA token from the discovered Keycloak server in the current scope, by using provided clientId and client secret
for the given audience (context), in URLEncoded form or not, and optionally a list of permissions.
|
TokenResponse |
queryUMAToken(URL tokenURL,
String authorization,
String audience,
List<String> permissions)
Queries an UMA token from the Keycloak server, by using provided authorization, for the given audience (context),
in URLEncoded form or not, and optionally a list of permissions.
|
TokenResponse |
queryUMAToken(URL tokenURL,
String clientId,
String clientSecret,
String audience,
List<String> permissions)
Queries an UMA token from the Keycloak server, by using provided clientId and client secret for the given audience
(context), in URLEncoded form or not, and optionally a list of permissions.
|
public URL findTokenEndpointURL() throws KeycloakClientException
KeycloakClientURL discovering it in the current scope provided by ScopeProviderfindTokenEndpointURL in interface KeycloakClientKeycloakClientException - if something goes wrong discovering the endpoint URLpublic TokenResponse queryUMAToken(String clientId, String clientSecret, List<String> permissions) throws KeycloakClientException
KeycloakClientqueryUMAToken in interface KeycloakClientclientId - the client idclientSecret - the client secretpermissions - a list of permissions, can be nullTokenResponse objectKeycloakClientException - if something goes wrong performing the querypublic TokenResponse queryUMAToken(String clientId, String clientSecret, String audience, List<String> permissions) throws KeycloakClientException
KeycloakClientqueryUMAToken in interface KeycloakClientclientId - the client idclientSecret - the client secretaudience - the audience (context) where to request the issuing of the ticketpermissions - a list of permissions, can be nullTokenResponse objectKeycloakClientException - if something goes wrong performing the querypublic TokenResponse queryUMAToken(URL tokenURL, String clientId, String clientSecret, String audience, List<String> permissions) throws KeycloakClientException
KeycloakClientqueryUMAToken in interface KeycloakClienttokenURL - the token endpoint URL of the Keycloak serverclientId - the client idclientSecret - the client secretaudience - the audience (context) where to request the issuing of the ticketpermissions - a list of permissions, can be nullTokenResponse objectKeycloakClientException - if something goes wrong performing the querypublic TokenResponse queryUMAToken(URL tokenURL, String authorization, String audience, List<String> permissions) throws KeycloakClientException
KeycloakClientqueryUMAToken in interface KeycloakClientauthorization - the authorization to be set as header (e.g. a "Basic ...." auth or an encoded JWT access token preceded by the "Bearer " string)audience - the audience (context) where to request the issuing of the ticket (URLEncoded)permissions - a list of permissions, can be nullTokenResponse objectKeycloakClientException - if something goes wrong performing the queryCopyright © 2021. All Rights Reserved.