public class DefaultKeycloakClientLegacyIS extends org.gcube.common.keycloak.DefaultKeycloakClient implements KeycloakClientLegacyIS
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
logger |
CATEGORY, DESCRIPTION, NAME| Constructor and Description |
|---|
DefaultKeycloakClientLegacyIS() |
| Modifier and Type | Method and Description |
|---|---|
URL |
computeIntrospectionEndpointURL()
Compute the keycloak
introspection endpoint URL starting from the discovered token endpoint it in the current scope provided by ScopeProvider. |
URL |
findTokenEndpointURL()
|
URL |
findTokenEndpointURL(String audience)
Finds the keycloak
token endpoint URL discovering it in the passed audience |
org.gcube.common.keycloak.model.TokenIntrospectionResponse |
introspectAccessToken(String clientId,
String clientSecret,
String accessTokenJWTString)
Introspects an access token against the Keycloak server discovered in the current scope.
|
boolean |
isAccessTokenVerified(String clientId,
String clientSecret,
String accessTokenJWTString)
Verifies an access token against the Keycloak server discovered in the current scope.
|
org.gcube.common.keycloak.model.TokenResponse |
queryOIDCToken(String clientId,
String clientSecret)
Queries an OIDC token from the Keycloak server discovered in the current scope, by using provided clientId and client secret.
|
org.gcube.common.keycloak.model.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 as audience (context), in URLEncoded form or not, and optionally a list of permissions.
|
org.gcube.common.keycloak.model.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.
|
org.gcube.common.keycloak.model.TokenResponse |
queryUMAToken(org.gcube.common.keycloak.model.TokenResponse oidcTokenResponse,
String audience,
List<String> permissions)
Queries an UMA token from the Keycloak server discovered in the current scope, by using access-token provided by the
TokenResponse object
for the given audience (context), in URLEncoded form or not, and optionally a list of permissions. |
org.gcube.common.keycloak.model.TokenResponse |
refreshToken(String refreshTokenJWTString)
Refreshes a previously issued token from the Keycloak server discovered in the current scope using the the refresh token JWT encoded string obtained with the access token in the previous token response.
|
org.gcube.common.keycloak.model.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.
|
org.gcube.common.keycloak.model.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.
|
org.gcube.common.keycloak.model.TokenResponse |
refreshToken(String clientId,
String clientSecret,
org.gcube.common.keycloak.model.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.
|
org.gcube.common.keycloak.model.TokenResponse |
refreshToken(String clientId,
org.gcube.common.keycloak.model.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.
|
org.gcube.common.keycloak.model.TokenResponse |
refreshToken(org.gcube.common.keycloak.model.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.
|
computeIntrospectionEndpointURL, constructBasicAuthenticationHeader, constructBeareAuthenticationHeader, getIntrospectionEndpointURL, getTokenEndpointURL, introspectAccessToken, isAccessTokenVerified, performRequest, queryOIDCToken, queryOIDCToken, queryUMAToken, queryUMAToken, queryUMAToken, refreshToken, refreshToken, refreshTokenclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomputeIntrospectionEndpointURL, getIntrospectionEndpointURL, getTokenEndpointURL, introspectAccessToken, isAccessTokenVerified, queryOIDCToken, queryOIDCToken, queryUMAToken, queryUMAToken, queryUMAToken, refreshToken, refreshToken, refreshTokenpublic URL findTokenEndpointURL(String audience) throws org.gcube.common.keycloak.KeycloakClientException
KeycloakClientLegacyIStoken endpoint URL discovering it in the passed audiencefindTokenEndpointURL in interface KeycloakClientLegacyIStoken endpoint URL in the current scopeKeycloakClientException - if something goes wrong discovering the endpoint URLpublic URL findTokenEndpointURL() throws org.gcube.common.keycloak.KeycloakClientException
KeycloakClientLegacyISfindTokenEndpointURL in interface KeycloakClientLegacyIStoken endpoint URL in the current scopeKeycloakClientException - if something goes wrong discovering the endpoint URLpublic URL computeIntrospectionEndpointURL() throws org.gcube.common.keycloak.KeycloakClientException
KeycloakClientLegacyISintrospection endpoint URL starting from the discovered token endpoint it in the current scope provided by ScopeProvider.computeIntrospectionEndpointURL in interface KeycloakClientLegacyISintrospection endpoint URL in the current scopeKeycloakClientException - if something goes wrong discovering the endpoint URLpublic org.gcube.common.keycloak.model.TokenResponse queryOIDCToken(String clientId, String clientSecret) throws org.gcube.common.keycloak.KeycloakClientException
KeycloakClientLegacyISqueryOIDCToken in interface KeycloakClientLegacyISclientId - the client idclientSecret - the client secretTokenResponse objectKeycloakClientException - if something goes wrong performing the querypublic org.gcube.common.keycloak.model.TokenResponse queryUMAToken(String clientId, String clientSecret, List<String> permissions) throws org.gcube.common.keycloak.KeycloakClientException
KeycloakClientLegacyISqueryUMAToken in interface KeycloakClientLegacyISclientId - the client idclientSecret - the client secretpermissions - a list of permissions, can be nullTokenResponse objectKeycloakClientException - if something goes wrong performing the querypublic org.gcube.common.keycloak.model.TokenResponse queryUMAToken(org.gcube.common.keycloak.model.TokenResponse oidcTokenResponse,
String audience,
List<String> permissions)
throws org.gcube.common.keycloak.KeycloakClientException
KeycloakClientLegacyISTokenResponse object
for the given audience (context), in URLEncoded form or not, and optionally a list of permissions.queryUMAToken in interface KeycloakClientLegacyISaudience - 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 org.gcube.common.keycloak.model.TokenResponse queryUMAToken(String clientId, String clientSecret, String audience, List<String> permissions) throws org.gcube.common.keycloak.KeycloakClientException
KeycloakClientLegacyISqueryUMAToken in interface KeycloakClientLegacyISclientId - 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 org.gcube.common.keycloak.model.TokenResponse refreshToken(org.gcube.common.keycloak.model.TokenResponse tokenResponse)
throws org.gcube.common.keycloak.KeycloakClientException
KeycloakClientLegacyISpublic clients types only.refreshToken in interface KeycloakClientLegacyIStokenResponse - the previously issued token as TokenResponse objectTokenResponse objectKeycloakClientException - if something goes wrong performing the refresh querypublic org.gcube.common.keycloak.model.TokenResponse refreshToken(String clientId, org.gcube.common.keycloak.model.TokenResponse tokenResponse) throws org.gcube.common.keycloak.KeycloakClientException
KeycloakClientLegacyISpublic clients types only.refreshToken in interface KeycloakClientLegacyISclientId - 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 querypublic org.gcube.common.keycloak.model.TokenResponse refreshToken(String clientId, String clientSecret, org.gcube.common.keycloak.model.TokenResponse tokenResponse) throws org.gcube.common.keycloak.KeycloakClientException
KeycloakClientLegacyISrefreshToken in interface KeycloakClientLegacyISclientId - 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 querypublic org.gcube.common.keycloak.model.TokenResponse refreshToken(String refreshTokenJWTString) throws org.gcube.common.keycloak.KeycloakClientException
KeycloakClientLegacyISpublic clients types only.refreshToken in interface KeycloakClientLegacyISrefreshTokenJWTString - 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 querypublic org.gcube.common.keycloak.model.TokenResponse refreshToken(String clientId, String refreshTokenJWTString) throws org.gcube.common.keycloak.KeycloakClientException
KeycloakClientLegacyISpublic clients types only.refreshToken in interface KeycloakClientLegacyISclientId - 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 querypublic org.gcube.common.keycloak.model.TokenResponse refreshToken(String clientId, String clientSecret, String refreshTokenJWTString) throws org.gcube.common.keycloak.KeycloakClientException
KeycloakClientLegacyISrefreshToken in interface KeycloakClientLegacyISclientId - 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 querypublic org.gcube.common.keycloak.model.TokenIntrospectionResponse introspectAccessToken(String clientId, String clientSecret, String accessTokenJWTString) throws org.gcube.common.keycloak.KeycloakClientException
KeycloakClientLegacyISintrospectAccessToken in interface KeycloakClientLegacyISclientId - the requestor client idclientSecret - the requestor client secretaccessTokenJWTString - the access token to verifytrue if the token is valid, false otherwiseKeycloakClientException - if something goes wrong performing the verificationpublic boolean isAccessTokenVerified(String clientId, String clientSecret, String accessTokenJWTString) throws org.gcube.common.keycloak.KeycloakClientException
KeycloakClientLegacyISisAccessTokenVerified in interface KeycloakClientLegacyISclientId - the requestor client idclientSecret - the requestor client secretaccessTokenJWTString - the access token to verifyTokenIntrospectionResponse object with the introspection results; in particular, the active field represents the token validityKeycloakClientException - if something goes wrong performing the verificationCopyright © 2022. All Rights Reserved.