Class UserOAuthApi

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

@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 UserOAuthApi extends Object
  • Constructor Details

    • UserOAuthApi

      public UserOAuthApi()
    • UserOAuthApi

      public UserOAuthApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • getRefreshTokenForUserAndClient

      public OAuth2RefreshToken getRefreshTokenForUserAndClient(String userId, String clientId, String tokenId, String expand) throws ApiException
      Retrieve a refresh token for a client Retrieves a refresh token issued for the specified user and client
      Parameters:
      userId - ID of an existing Okta user (required)
      clientId - `client_id` of the app (required)
      tokenId - `id` of Token (required)
      expand - Valid value: `scope`. If specified, scope details are included in the `_embedded` attribute. (optional)
      Returns:
      OAuth2RefreshToken
      Throws:
      ApiException - if fails to make API call
    • getRefreshTokenForUserAndClient

      public OAuth2RefreshToken getRefreshTokenForUserAndClient(String userId, String clientId, String tokenId, String expand, Map<String,String> additionalHeaders) throws ApiException
      Retrieve a refresh token for a client Retrieves a refresh token issued for the specified user and client
      Parameters:
      userId - ID of an existing Okta user (required)
      clientId - `client_id` of the app (required)
      tokenId - `id` of Token (required)
      expand - Valid value: `scope`. If specified, scope details are included in the `_embedded` attribute. (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      OAuth2RefreshToken
      Throws:
      ApiException - if fails to make API call
    • listRefreshTokensForUserAndClient

      public List<OAuth2RefreshToken> listRefreshTokensForUserAndClient(String userId, String clientId, String expand, String after, Integer limit) throws ApiException
      List all refresh tokens for a client Lists all refresh tokens issued for the specified user and client
      Parameters:
      userId - ID of an existing Okta user (required)
      clientId - `client_id` of the app (required)
      expand - Valid value: `scope`. If specified, scope details are included in the `_embedded` attribute. (optional)
      after - The cursor to use for pagination. It is an opaque string that specifies your current location in the list and is obtained from the `Link` response header. See [Pagination](https://developer.okta.com/docs/api/#pagination). (optional)
      limit - Specifies the number of tokens to return (optional, default to 20)
      Returns:
      List<OAuth2RefreshToken>
      Throws:
      ApiException - if fails to make API call
    • listRefreshTokensForUserAndClient

      public List<OAuth2RefreshToken> listRefreshTokensForUserAndClient(String userId, String clientId, String expand, String after, Integer limit, Map<String,String> additionalHeaders) throws ApiException
      List all refresh tokens for a client Lists all refresh tokens issued for the specified user and client
      Parameters:
      userId - ID of an existing Okta user (required)
      clientId - `client_id` of the app (required)
      expand - Valid value: `scope`. If specified, scope details are included in the `_embedded` attribute. (optional)
      after - The cursor to use for pagination. It is an opaque string that specifies your current location in the list and is obtained from the `Link` response header. See [Pagination](https://developer.okta.com/docs/api/#pagination). (optional)
      limit - Specifies the number of tokens to return (optional, default to 20)
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<OAuth2RefreshToken>
      Throws:
      ApiException - if fails to make API call
    • listRefreshTokensForUserAndClientPaged

      public Iterable<OAuth2RefreshToken> listRefreshTokensForUserAndClientPaged(String userId, String clientId, String expand, String after, Integer limit)
      List all refresh tokens for a client (Paginated) Lists all refresh tokens issued for the specified user and client 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:
      userId - ID of an existing Okta user (required)
      clientId - `client_id` of the app (required)
      expand - Valid value: `scope`. If specified, scope details are included in the `_embedded` attribute. (optional)
      after - The cursor to use for pagination. It is an opaque string that specifies your current location in the list and is obtained from the `Link` response header. See [Pagination](https://developer.okta.com/docs/api/#pagination). (optional)
      limit - Specifies the number of tokens to return (optional, default to 20)
      Returns:
      Iterable<OAuth2RefreshToken> lazy iterable over all pages
    • listRefreshTokensForUserAndClientPaged

      public Iterable<OAuth2RefreshToken> listRefreshTokensForUserAndClientPaged(String userId, String clientId, String expand, String after, Integer limit, Map<String,String> additionalHeaders)
      List all refresh tokens for a client (Paginated with additional headers) Lists all refresh tokens issued for the specified user and client This method returns a lazy, paginated iterable that automatically handles pagination. It is thread-safe and does not cause memory leaks.
      Parameters:
      userId - ID of an existing Okta user (required)
      clientId - `client_id` of the app (required)
      expand - Valid value: `scope`. If specified, scope details are included in the `_embedded` attribute. (optional)
      after - The cursor to use for pagination. It is an opaque string that specifies your current location in the list and is obtained from the `Link` response header. See [Pagination](https://developer.okta.com/docs/api/#pagination). (optional)
      limit - Specifies the number of tokens to return (optional, default to 20)
      additionalHeaders - additional headers for this call
      Returns:
      Iterable<OAuth2RefreshToken> lazy iterable over all pages
    • revokeTokenForUserAndClient

      public void revokeTokenForUserAndClient(String userId, String clientId, String tokenId) throws ApiException
      Revoke a token for a client Revokes the specified refresh and access tokens
      Parameters:
      userId - ID of an existing Okta user (required)
      clientId - `client_id` of the app (required)
      tokenId - `id` of Token (required)
      Throws:
      ApiException - if fails to make API call
    • revokeTokenForUserAndClient

      public void revokeTokenForUserAndClient(String userId, String clientId, String tokenId, Map<String,String> additionalHeaders) throws ApiException
      Revoke a token for a client Revokes the specified refresh and access tokens
      Parameters:
      userId - ID of an existing Okta user (required)
      clientId - `client_id` of the app (required)
      tokenId - `id` of Token (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • revokeTokensForUserAndClient

      public void revokeTokensForUserAndClient(String userId, String clientId) throws ApiException
      Revoke all refresh tokens for a client Revokes all refresh tokens issued for the specified user and client
      Parameters:
      userId - ID of an existing Okta user (required)
      clientId - `client_id` of the app (required)
      Throws:
      ApiException - if fails to make API call
    • revokeTokensForUserAndClient

      public void revokeTokensForUserAndClient(String userId, String clientId, Map<String,String> additionalHeaders) throws ApiException
      Revoke all refresh tokens for a client Revokes all refresh tokens issued for the specified user and client
      Parameters:
      userId - ID of an existing Okta user (required)
      clientId - `client_id` of the app (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • getObjectMapper

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