Class UserSessionsApi

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

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

    • UserSessionsApi

      public UserSessionsApi()
    • UserSessionsApi

      public UserSessionsApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • revokeUserSessions

      public void revokeUserSessions(String userId, Boolean oauthTokens, Boolean forgetDevices) throws ApiException
      Revoke all user sessions Revokes all active identity provider sessions of the user. This forces the user to authenticate on the next operation. Optionally revokes OpenID Connect and OAuth refresh and access tokens issued to the user. You can also clear the user's remembered factors for all devices using the `forgetDevices` parameter. See [forgetDevices](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/UserSessions/#tag/UserSessions/operation/revokeUserSessions!in=query&path=forgetDevices&t=request). > **Note:** This operation doesn't clear the sessions created for web or native apps.
      Parameters:
      userId - ID of an existing Okta user (required)
      oauthTokens - Revokes issued OpenID Connect and OAuth refresh and access tokens (optional, default to false)
      forgetDevices - Clears the user's remembered factors for all devices. > **Note:** This parameter defaults to false in Classic Engine. (optional, default to true)
      Throws:
      ApiException - if fails to make API call
    • revokeUserSessions

      public void revokeUserSessions(String userId, Boolean oauthTokens, Boolean forgetDevices, Map<String,String> additionalHeaders) throws ApiException
      Revoke all user sessions Revokes all active identity provider sessions of the user. This forces the user to authenticate on the next operation. Optionally revokes OpenID Connect and OAuth refresh and access tokens issued to the user. You can also clear the user's remembered factors for all devices using the `forgetDevices` parameter. See [forgetDevices](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/UserSessions/#tag/UserSessions/operation/revokeUserSessions!in=query&path=forgetDevices&t=request). > **Note:** This operation doesn't clear the sessions created for web or native apps.
      Parameters:
      userId - ID of an existing Okta user (required)
      oauthTokens - Revokes issued OpenID Connect and OAuth refresh and access tokens (optional, default to false)
      forgetDevices - Clears the user's remembered factors for all devices. > **Note:** This parameter defaults to false in Classic Engine. (optional, default to true)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • getObjectMapper

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