Package com.okta.sdk.resource.api
Class OAuth2ResourceServerCredentialsKeysApi
java.lang.Object
com.okta.sdk.resource.api.OAuth2ResourceServerCredentialsKeysApi
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2026-03-13T17:36:05.533634+05:30[Asia/Kolkata]",
comments="Generator version: 7.15.0")
public class OAuth2ResourceServerCredentialsKeysApi
extends Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactivateOAuth2ResourceServerJsonWebKey(String authServerId, String keyId) Activate a Custom Authorization Server Public JSON Web Key Activates a custom authorization server public JSON web key by key `id`.activateOAuth2ResourceServerJsonWebKey(String authServerId, String keyId, Map<String, String> additionalHeaders) Activate a Custom Authorization Server Public JSON Web Key Activates a custom authorization server public JSON web key by key `id`.addOAuth2ResourceServerJsonWebKey(String authServerId, OAuth2ResourceServerJsonWebKeyRequestBody oauth2ResourceServerJsonWebKeyRequestBody) Add a JSON Web Key Adds a new JSON Web Key to the custom authorization server`s JSON web keys.addOAuth2ResourceServerJsonWebKey(String authServerId, OAuth2ResourceServerJsonWebKeyRequestBody oauth2ResourceServerJsonWebKeyRequestBody, Map<String, String> additionalHeaders) Add a JSON Web Key Adds a new JSON Web Key to the custom authorization server`s JSON web keys.deactivateOAuth2ResourceServerJsonWebKey(String authServerId, String keyId) Deactivate a Custom Authorization Server Public JSON Web Key Deactivates a custom authorization server public JSON web key by key `id`.deactivateOAuth2ResourceServerJsonWebKey(String authServerId, String keyId, Map<String, String> additionalHeaders) Deactivate a Custom Authorization Server Public JSON Web Key Deactivates a custom authorization server public JSON web key by key `id`.voiddeleteOAuth2ResourceServerJsonWebKey(String authServerId, String keyId) Delete a Custom Authorization Server Public JSON Web Key Deletes a custom authorization server public JSON web key by key `id`.voiddeleteOAuth2ResourceServerJsonWebKey(String authServerId, String keyId, Map<String, String> additionalHeaders) Delete a Custom Authorization Server Public JSON Web Key Deletes a custom authorization server public JSON web key by key `id`.getOAuth2ResourceServerJsonWebKey(String authServerId, String keyId) Retrieve a Custom Authorization Server Public JSON Web Key Retrieves a custom authorization server public JSON web key by key `id`getOAuth2ResourceServerJsonWebKey(String authServerId, String keyId, Map<String, String> additionalHeaders) Retrieve a Custom Authorization Server Public JSON Web Key Retrieves a custom authorization server public JSON web key by key `id`protected static com.fasterxml.jackson.databind.ObjectMapperlistOAuth2ResourceServerJsonWebKeys(String authServerId) List all Custom Authorization Server Public JSON Web Keys Lists all the public keys used by the custom authorization serverlistOAuth2ResourceServerJsonWebKeys(String authServerId, Map<String, String> additionalHeaders) List all Custom Authorization Server Public JSON Web Keys Lists all the public keys used by the custom authorization serverlistOAuth2ResourceServerJsonWebKeysPaged(String authServerId) List all Custom Authorization Server Public JSON Web Keys (Paginated) Lists all the public keys used by the custom authorization server This method returns a lazy, paginated iterable that automatically handles pagination.listOAuth2ResourceServerJsonWebKeysPaged(String authServerId, Map<String, String> additionalHeaders) List all Custom Authorization Server Public JSON Web Keys (Paginated with additional headers) Lists all the public keys used by the custom authorization server This method returns a lazy, paginated iterable that automatically handles pagination.voidsetApiClient(ApiClient apiClient)
-
Constructor Details
-
OAuth2ResourceServerCredentialsKeysApi
public OAuth2ResourceServerCredentialsKeysApi() -
OAuth2ResourceServerCredentialsKeysApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
activateOAuth2ResourceServerJsonWebKey
public OAuth2ResourceServerJsonWebKey activateOAuth2ResourceServerJsonWebKey(String authServerId, String keyId) throws ApiException Activate a Custom Authorization Server Public JSON Web Key Activates a custom authorization server public JSON web key by key `id`. > **Note:** You can have only one active key at any given time for the authorization server. When you activate an inactive key, Okta automatically deactivates the current active key.- Parameters:
authServerId- `id` of the Authorization Server (required)keyId- Unique `id` of the Custom Authorization Server JSON Web Key (required)- Returns:
- OAuth2ResourceServerJsonWebKey
- Throws:
ApiException- if fails to make API call
-
activateOAuth2ResourceServerJsonWebKey
public OAuth2ResourceServerJsonWebKey activateOAuth2ResourceServerJsonWebKey(String authServerId, String keyId, Map<String, String> additionalHeaders) throws ApiExceptionActivate a Custom Authorization Server Public JSON Web Key Activates a custom authorization server public JSON web key by key `id`. > **Note:** You can have only one active key at any given time for the authorization server. When you activate an inactive key, Okta automatically deactivates the current active key.- Parameters:
authServerId- `id` of the Authorization Server (required)keyId- Unique `id` of the Custom Authorization Server JSON Web Key (required)additionalHeaders- additionalHeaders for this call- Returns:
- OAuth2ResourceServerJsonWebKey
- Throws:
ApiException- if fails to make API call
-
addOAuth2ResourceServerJsonWebKey
public OAuth2ResourceServerJsonWebKey addOAuth2ResourceServerJsonWebKey(String authServerId, OAuth2ResourceServerJsonWebKeyRequestBody oauth2ResourceServerJsonWebKeyRequestBody) throws ApiException Add a JSON Web Key Adds a new JSON Web Key to the custom authorization server`s JSON web keys. > **Note:** This API doesn't allow you to add a key if the existing key doesn't have a `kid`. Use the [Replace an Authorization Server](/openapi/okta-management/management/tag/AuthorizationServer/#tag/AuthorizationServer/operation/replaceAuthorizationServer) operation to update the JWKS or [Delete a Custom Authorization Server Public JSON Web Key](/openapi/okta-management/management/tag/OAuth2ResourceServerCredentialsKeys/#tag/OAuth2ResourceServerCredentialsKeys/operation/deleteOAuth2ResourceServerJsonWebKey) and re-add the key with a `kid`. > **Note:** This API doesn't allow you to add a key with an ACTIVE status. You need to add an INACTIVE key first, and then ACTIVATE the key.- Parameters:
authServerId- `id` of the Authorization Server (required)oauth2ResourceServerJsonWebKeyRequestBody- (required)- Returns:
- OAuth2ResourceServerJsonWebKey
- Throws:
ApiException- if fails to make API call
-
addOAuth2ResourceServerJsonWebKey
public OAuth2ResourceServerJsonWebKey addOAuth2ResourceServerJsonWebKey(String authServerId, OAuth2ResourceServerJsonWebKeyRequestBody oauth2ResourceServerJsonWebKeyRequestBody, Map<String, String> additionalHeaders) throws ApiExceptionAdd a JSON Web Key Adds a new JSON Web Key to the custom authorization server`s JSON web keys. > **Note:** This API doesn't allow you to add a key if the existing key doesn't have a `kid`. Use the [Replace an Authorization Server](/openapi/okta-management/management/tag/AuthorizationServer/#tag/AuthorizationServer/operation/replaceAuthorizationServer) operation to update the JWKS or [Delete a Custom Authorization Server Public JSON Web Key](/openapi/okta-management/management/tag/OAuth2ResourceServerCredentialsKeys/#tag/OAuth2ResourceServerCredentialsKeys/operation/deleteOAuth2ResourceServerJsonWebKey) and re-add the key with a `kid`. > **Note:** This API doesn't allow you to add a key with an ACTIVE status. You need to add an INACTIVE key first, and then ACTIVATE the key.- Parameters:
authServerId- `id` of the Authorization Server (required)oauth2ResourceServerJsonWebKeyRequestBody- (required)additionalHeaders- additionalHeaders for this call- Returns:
- OAuth2ResourceServerJsonWebKey
- Throws:
ApiException- if fails to make API call
-
deactivateOAuth2ResourceServerJsonWebKey
public OAuth2ResourceServerJsonWebKey deactivateOAuth2ResourceServerJsonWebKey(String authServerId, String keyId) throws ApiException Deactivate a Custom Authorization Server Public JSON Web Key Deactivates a custom authorization server public JSON web key by key `id`. > **Note:** Deactivating the active key isn't allowed if the authorization server has access token encryption enabled. You can activate another key, which makes the current key inactive.- Parameters:
authServerId- `id` of the Authorization Server (required)keyId- Unique `id` of the Custom Authorization Server JSON Web Key (required)- Returns:
- OAuth2ResourceServerJsonWebKey
- Throws:
ApiException- if fails to make API call
-
deactivateOAuth2ResourceServerJsonWebKey
public OAuth2ResourceServerJsonWebKey deactivateOAuth2ResourceServerJsonWebKey(String authServerId, String keyId, Map<String, String> additionalHeaders) throws ApiExceptionDeactivate a Custom Authorization Server Public JSON Web Key Deactivates a custom authorization server public JSON web key by key `id`. > **Note:** Deactivating the active key isn't allowed if the authorization server has access token encryption enabled. You can activate another key, which makes the current key inactive.- Parameters:
authServerId- `id` of the Authorization Server (required)keyId- Unique `id` of the Custom Authorization Server JSON Web Key (required)additionalHeaders- additionalHeaders for this call- Returns:
- OAuth2ResourceServerJsonWebKey
- Throws:
ApiException- if fails to make API call
-
deleteOAuth2ResourceServerJsonWebKey
public void deleteOAuth2ResourceServerJsonWebKey(String authServerId, String keyId) throws ApiException Delete a Custom Authorization Server Public JSON Web Key Deletes a custom authorization server public JSON web key by key `id`. You can only delete an inactive key.- Parameters:
authServerId- `id` of the Authorization Server (required)keyId- Unique `id` of the Custom Authorization Server JSON Web Key (required)- Throws:
ApiException- if fails to make API call
-
deleteOAuth2ResourceServerJsonWebKey
public void deleteOAuth2ResourceServerJsonWebKey(String authServerId, String keyId, Map<String, String> additionalHeaders) throws ApiExceptionDelete a Custom Authorization Server Public JSON Web Key Deletes a custom authorization server public JSON web key by key `id`. You can only delete an inactive key.- Parameters:
authServerId- `id` of the Authorization Server (required)keyId- Unique `id` of the Custom Authorization Server JSON Web Key (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
getOAuth2ResourceServerJsonWebKey
public OAuth2ResourceServerJsonWebKey getOAuth2ResourceServerJsonWebKey(String authServerId, String keyId) throws ApiException Retrieve a Custom Authorization Server Public JSON Web Key Retrieves a custom authorization server public JSON web key by key `id`- Parameters:
authServerId- `id` of the Authorization Server (required)keyId- Unique `id` of the Custom Authorization Server JSON Web Key (required)- Returns:
- OAuth2ResourceServerJsonWebKey
- Throws:
ApiException- if fails to make API call
-
getOAuth2ResourceServerJsonWebKey
public OAuth2ResourceServerJsonWebKey getOAuth2ResourceServerJsonWebKey(String authServerId, String keyId, Map<String, String> additionalHeaders) throws ApiExceptionRetrieve a Custom Authorization Server Public JSON Web Key Retrieves a custom authorization server public JSON web key by key `id`- Parameters:
authServerId- `id` of the Authorization Server (required)keyId- Unique `id` of the Custom Authorization Server JSON Web Key (required)additionalHeaders- additionalHeaders for this call- Returns:
- OAuth2ResourceServerJsonWebKey
- Throws:
ApiException- if fails to make API call
-
listOAuth2ResourceServerJsonWebKeys
public List<OAuth2ResourceServerJsonWebKey> listOAuth2ResourceServerJsonWebKeys(String authServerId) throws ApiException List all Custom Authorization Server Public JSON Web Keys Lists all the public keys used by the custom authorization server- Parameters:
authServerId- `id` of the Authorization Server (required)- Returns:
- List<OAuth2ResourceServerJsonWebKey>
- Throws:
ApiException- if fails to make API call
-
listOAuth2ResourceServerJsonWebKeys
public List<OAuth2ResourceServerJsonWebKey> listOAuth2ResourceServerJsonWebKeys(String authServerId, Map<String, String> additionalHeaders) throws ApiExceptionList all Custom Authorization Server Public JSON Web Keys Lists all the public keys used by the custom authorization server- Parameters:
authServerId- `id` of the Authorization Server (required)additionalHeaders- additionalHeaders for this call- Returns:
- List<OAuth2ResourceServerJsonWebKey>
- Throws:
ApiException- if fails to make API call
-
listOAuth2ResourceServerJsonWebKeysPaged
public Iterable<OAuth2ResourceServerJsonWebKey> listOAuth2ResourceServerJsonWebKeysPaged(String authServerId) List all Custom Authorization Server Public JSON Web Keys (Paginated) Lists all the public keys used by the custom authorization server This method returns a lazy, paginated iterable that automatically handles pagination. It is thread-safe and does not cause memory leaks. Use this method in a for-each loop to automatically fetch all pages without manual cursor management.- Parameters:
authServerId- `id` of the Authorization Server (required)- Returns:
- Iterable<OAuth2ResourceServerJsonWebKey> lazy iterable over all pages
-
listOAuth2ResourceServerJsonWebKeysPaged
public Iterable<OAuth2ResourceServerJsonWebKey> listOAuth2ResourceServerJsonWebKeysPaged(String authServerId, Map<String, String> additionalHeaders) List all Custom Authorization Server Public JSON Web Keys (Paginated with additional headers) Lists all the public keys used by the custom authorization server This method returns a lazy, paginated iterable that automatically handles pagination. It is thread-safe and does not cause memory leaks.- Parameters:
authServerId- `id` of the Authorization Server (required)additionalHeaders- additional headers for this call- Returns:
- Iterable<OAuth2ResourceServerJsonWebKey> lazy iterable over all pages
-
getObjectMapper
protected static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
-