public interface KeycloakClient
| Modifier and Type | Field and Description |
|---|---|
static String |
CATEGORY |
static String |
DESCRIPTION |
static org.slf4j.Logger |
logger |
static String |
NAME |
| 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 Keycloak server discovered 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 Keycloak server discovered 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.
|
TokenResponse |
refreshToken(String clientId,
String refreshTokenJWTString)
Refreshes a previously issued token from the Keycloak server discovered in the current scope using the provided
client id and the refresh token JWT encoded string obtained with the access token in the previous token response.
|
TokenResponse |
refreshToken(String clientId,
String clientSecret,
String refreshTokenJWTString)
Refreshes a previously issued token from the Keycloak server discovered in the current scope using the provided
client id and secret and the refresh token JWT encoded string obtained with the access token in the previous
token response.
|
TokenResponse |
refreshToken(String clientId,
String clientSecret,
TokenResponse tokenResponse)
Refreshes a previously issued token from the Keycloak server discovered in the current scope using the refresh
token JWT encoded string in the token response object and the provided client id and secret.
|
TokenResponse |
refreshToken(String clientId,
TokenResponse tokenResponse)
Refreshes a previously issued token from the Keycloak server discovered in the current scope using the refresh
token JWT encoded string in the token response object and the provided client id.
|
TokenResponse |
refreshToken(TokenResponse tokenResponse)
Refreshes a previously issued token from the Keycloak server discovered in the current scope using the refresh
token JWT encoded string in the token response object.
|
TokenResponse |
refreshToken(URL tokenURL,
String clientId,
String clientSecret,
String refreshTokenJWTString)
Refreshes a previously issued token from the Keycloak server by using the client id and secret
and the refresh token JWT encoded string obtained with the access token in the previous token response.
|
TokenResponse |
refreshToken(URL tokenURL,
String clientId,
String clientSecret,
TokenResponse tokenResponse)
Refreshes a previously issued token from the Keycloak server using the refresh token JWT encoded string in the
token response object and the provided client id and secret.
|
TokenResponse |
refreshToken(URL tokenURL,
TokenResponse tokenResponse)
Refreshes a previously issued token from the Keycloak server using the refresh token JWT encoded string in the
token response object.
|
static final org.slf4j.Logger logger
static final String CATEGORY
static final String NAME
static final String DESCRIPTION
URL findTokenEndpointURL() throws KeycloakClientException
URL discovering it in the current scope provided by ScopeProviderKeycloakClientException - if something goes wrong discovering the endpoint URLTokenResponse queryUMAToken(URL tokenURL, String authorization, String audience, List<String> permissions) throws KeycloakClientException
tokenUrl - the token endpoint URL of the OIDC serverauthorization - 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 queryTokenResponse queryUMAToken(URL tokenURL, String clientId, String clientSecret, String audience, List<String> permissions) throws KeycloakClientException
tokenURL - 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 queryTokenResponse queryUMAToken(String clientId, String clientSecret, String audience, List<String> permissions) throws KeycloakClientException
clientId - 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 queryTokenResponse queryUMAToken(String clientId, String clientSecret, List<String> permissions) throws KeycloakClientException
clientId - the client idclientSecret - the client secretpermissions - a list of permissions, can be nullTokenResponse objectKeycloakClientException - if something goes wrong performing the queryTokenResponse refreshToken(TokenResponse tokenResponse) throws KeycloakClientException
public clients types only.tokenResponse - the previously issued token as TokenResponse objectTokenResponse objectKeycloakClientException - if something goes wrong performing the refresh queryTokenResponse refreshToken(URL tokenURL, TokenResponse tokenResponse) throws KeycloakClientException
public clients types only.tokenUrl - the token endpoint URL of the OIDC servertokenResponse - the previously issued token as TokenResponse objectTokenResponse objectKeycloakClientException - if something goes wrong performing the refresh queryTokenResponse refreshToken(String clientId, TokenResponse tokenResponse) throws KeycloakClientException
public clients types only.clientId - the requestor client id, may be null and in this case will be take from the access token "issued for" claimtokenResponse - the previously issued token as TokenResponse objectTokenResponse objectKeycloakClientException - if something goes wrong performing the refresh queryTokenResponse refreshToken(String clientId, String clientSecret, TokenResponse tokenResponse) throws KeycloakClientException
clientId - the requestor client id, may be null and in this case will be take from the access token "issued for" claimclientSecret - the requestor client secret, may be null for non-confidential clientstokenResponse - the previously issued token as TokenResponse objectTokenResponse objectKeycloakClientException - if something goes wrong performing the refresh queryTokenResponse refreshToken(URL tokenURL, String clientId, String clientSecret, TokenResponse tokenResponse) throws KeycloakClientException
clientId - the requestor client id, may be null and in this case will be take from the access token "issued for" claimclientSecret - the requestor client secret, may be null for non-confidential clientstokenResponse - the previously issued token as TokenResponse objectTokenResponse objectKeycloakClientException - if something goes wrong performing the refresh queryTokenResponse refreshToken(String clientId, String refreshTokenJWTString) throws KeycloakClientException
public clients types only.clientId - the requestor client idrefreshTokenJWTString - the previously issued refresh token JWT string taken from the same token response of the access token parameterTokenResponse objectKeycloakClientException - if something goes wrong performing the refresh queryTokenResponse refreshToken(String clientId, String clientSecret, String refreshTokenJWTString) throws KeycloakClientException
clientId - the requestor client idclientSecret - the requestor client secret, may be null for non-confidential clientsrefreshTokenJWTString - the previously issued refresh token JWT string taken from the same token response of the access token parameterTokenResponse objectKeycloakClientException - if something goes wrong performing the refresh queryTokenResponse refreshToken(URL tokenURL, String clientId, String clientSecret, String refreshTokenJWTString) throws KeycloakClientException
tokenUrl - the token endpoint URL of the OIDC serverclientId - the requestor client idclientSecret - the requestor client secret, may be null for non-confidential clientsrefreshTokenJWTString - the previously issued refresh token JWT stringTokenResponse objectKeycloakClientException - if something goes wrong performing the refresh queryCopyright © 2021. All Rights Reserved.