Interface OAuth2TokenKeyService
- All Known Implementing Classes:
DefaultOAuth2TokenKeyService,SpringOAuth2TokenKeyService
public interface OAuth2TokenKeyService
Service that targets Identity service (xsuaa and identity) to request Json
Web Keys.
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringretrieveTokenKeys(URI tokenKeysEndpointUri, String tenantId) Requests token web key set from Xsuaa OAuth Server.default StringretrieveTokenKeys(URI tokenKeysEndpointUri, String tenantId, String clientId) Deprecated.retrieveTokenKeys(URI tokenKeysEndpointUri, Map<String, String> params) Retrieves the JWKS (JSON Web Key Set) from the OAuth2 Server.
-
Method Details
-
retrieveTokenKeys
default String retrieveTokenKeys(@Nonnull URI tokenKeysEndpointUri, @Nullable String tenantId) throws OAuth2ServiceException Requests token web key set from Xsuaa OAuth Server.- 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
@Deprecated default String retrieveTokenKeys(@Nonnull URI tokenKeysEndpointUri, @Nullable String tenantId, @Nullable String clientId) throws OAuth2ServiceException Deprecated.UseretrieveTokenKeys(URI, Map)instead Requests token web key set from IAS OAuth Server.- 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.
-
retrieveTokenKeys
String retrieveTokenKeys(@Nonnull URI tokenKeysEndpointUri, Map<String, String> params) throws OAuth2ServiceExceptionRetrieves the JWKS (JSON Web Key Set) from the OAuth2 Server.- Parameters:
tokenKeysEndpointUri- the JWKS endpoint URI.params- additional header parameters that are sent along with the request. Use constants fromHttpHeadersfor the header keys.- Returns:
- a JWKS in JSON format.
- Throws:
OAuth2ServiceException- in case of an error during the http request.
-
retrieveTokenKeys(URI, Map)instead Requests token web key set from IAS OAuth Server.