Class DefaultOAuth2TokenKeyService
java.lang.Object
com.sap.cloud.security.xsuaa.client.DefaultOAuth2TokenKeyService
- All Implemented Interfaces:
OAuth2TokenKeyService
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultOAuth2TokenKeyService(org.apache.http.impl.client.CloseableHttpClient httpClient) -
Method Summary
Modifier and TypeMethodDescriptionretrieveTokenKeys(URI tokenKeysEndpointUri, String tenantId) Requests token web key set from Xsuaa OAuth Server.retrieveTokenKeys(URI tokenKeysEndpointUri, String tenantId, String clientId) Requests token web key set from IAS OAuth Server.
-
Constructor Details
-
DefaultOAuth2TokenKeyService
public DefaultOAuth2TokenKeyService() -
DefaultOAuth2TokenKeyService
public DefaultOAuth2TokenKeyService(@Nonnull org.apache.http.impl.client.CloseableHttpClient httpClient)
-
-
Method Details
-
retrieveTokenKeys
public String retrieveTokenKeys(@Nonnull URI tokenKeysEndpointUri, @Nullable String tenantId) throws OAuth2ServiceException Description copied from interface:OAuth2TokenKeyServiceRequests token web key set from Xsuaa OAuth Server.- Specified by:
retrieveTokenKeysin interfaceOAuth2TokenKeyService- Parameters:
tokenKeysEndpointUri- the token endpoint URI (jku).tenantId- the unique identifier of the tenant. Obligatory parameter in context of multi-tenant IAS applications to make sure that the tenant id belongs to the IAS tenant.- Returns:
- list of JSON Web Token (JWT) keys as JSON string.
- Throws:
OAuth2ServiceException- in case of an error during the http request.
-
retrieveTokenKeys
public String retrieveTokenKeys(@Nonnull URI tokenKeysEndpointUri, @Nullable String tenantId, @Nullable String clientId) throws OAuth2ServiceException Description copied from interface:OAuth2TokenKeyServiceRequests token web key set from IAS OAuth Server.- Specified by:
retrieveTokenKeysin interfaceOAuth2TokenKeyService- Parameters:
tokenKeysEndpointUri- the token endpoint URI (jku).tenantId- the unique identifier of the tenant. Obligatory parameter in context of multi-tenant IAS applications to make sure that the tenant id belongs to the IAS tenant.clientId- clientId from the service binding- Returns:
- list of JSON Web Token (JWT) keys as JSON string.
- Throws:
OAuth2ServiceException- in case of an error during the http request.
-