Class ApplicationTokensApi

java.lang.Object
com.okta.sdk.resource.api.ApplicationTokensApi

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-09-23T08:35:59.300824-05:00[America/Chicago]", comments="Generator version: 7.8.0") public class ApplicationTokensApi extends Object
  • Constructor Details

    • ApplicationTokensApi

      public ApplicationTokensApi()
    • ApplicationTokensApi

      public ApplicationTokensApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • getOAuth2TokenForApplication

      public OAuth2RefreshToken getOAuth2TokenForApplication(String appId, String tokenId, String expand) throws ApiException
      Retrieve an Application Token Retrieves a refresh token for the specified app
      Parameters:
      appId - Application ID (required)
      tokenId - `id` of Token (required)
      expand - An optional parameter to return scope details in the `_embedded` property. Valid value: `scope` (optional)
      Returns:
      OAuth2RefreshToken
      Throws:
      ApiException - if fails to make API call
    • getOAuth2TokenForApplication

      public OAuth2RefreshToken getOAuth2TokenForApplication(String appId, String tokenId, String expand, Map<String,String> additionalHeaders) throws ApiException
      Retrieve an Application Token Retrieves a refresh token for the specified app
      Parameters:
      appId - Application ID (required)
      tokenId - `id` of Token (required)
      expand - An optional parameter to return scope details in the `_embedded` property. Valid value: `scope` (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      OAuth2RefreshToken
      Throws:
      ApiException - if fails to make API call
    • listOAuth2TokensForApplication

      public List<OAuth2RefreshToken> listOAuth2TokensForApplication(String appId, String expand, String after, Integer limit) throws ApiException
      List all Application Refresh Tokens Lists all refresh tokens for an app > **Note:** The results are [paginated](/#pagination) according to the `limit` parameter. > If there are multiple pages of results, the Link header contains a `next` link that you need to use as an opaque value (follow it, don't parse it).
      Parameters:
      appId - Application ID (required)
      expand - An optional parameter to return scope details in the `_embedded` property. Valid value: `scope` (optional)
      after - Specifies the pagination cursor for the next page of results. Treat this as an opaque value obtained through the next link relationship. See [Pagination](/#pagination). (optional)
      limit - A limit on the number of objects to return (optional, default to 20)
      Returns:
      List<OAuth2RefreshToken>
      Throws:
      ApiException - if fails to make API call
    • listOAuth2TokensForApplication

      public List<OAuth2RefreshToken> listOAuth2TokensForApplication(String appId, String expand, String after, Integer limit, Map<String,String> additionalHeaders) throws ApiException
      List all Application Refresh Tokens Lists all refresh tokens for an app > **Note:** The results are [paginated](/#pagination) according to the `limit` parameter. > If there are multiple pages of results, the Link header contains a `next` link that you need to use as an opaque value (follow it, don't parse it).
      Parameters:
      appId - Application ID (required)
      expand - An optional parameter to return scope details in the `_embedded` property. Valid value: `scope` (optional)
      after - Specifies the pagination cursor for the next page of results. Treat this as an opaque value obtained through the next link relationship. See [Pagination](/#pagination). (optional)
      limit - A limit on the number of objects to return (optional, default to 20)
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<OAuth2RefreshToken>
      Throws:
      ApiException - if fails to make API call
    • revokeOAuth2TokenForApplication

      public void revokeOAuth2TokenForApplication(String appId, String tokenId) throws ApiException
      Revoke an Application Token Revokes the specified token for the specified app
      Parameters:
      appId - Application ID (required)
      tokenId - `id` of Token (required)
      Throws:
      ApiException - if fails to make API call
    • revokeOAuth2TokenForApplication

      public void revokeOAuth2TokenForApplication(String appId, String tokenId, Map<String,String> additionalHeaders) throws ApiException
      Revoke an Application Token Revokes the specified token for the specified app
      Parameters:
      appId - Application ID (required)
      tokenId - `id` of Token (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • revokeOAuth2TokensForApplication

      public void revokeOAuth2TokensForApplication(String appId) throws ApiException
      Revoke all Application Tokens Revokes all OAuth 2.0 refresh tokens for the specified app. Any access tokens issued with these refresh tokens are also revoked, but access tokens issued without a refresh token aren't affected.
      Parameters:
      appId - Application ID (required)
      Throws:
      ApiException - if fails to make API call
    • revokeOAuth2TokensForApplication

      public void revokeOAuth2TokensForApplication(String appId, Map<String,String> additionalHeaders) throws ApiException
      Revoke all Application Tokens Revokes all OAuth 2.0 refresh tokens for the specified app. Any access tokens issued with these refresh tokens are also revoked, but access tokens issued without a refresh token aren't affected.
      Parameters:
      appId - Application ID (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • getObjectMapper

      protected static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()