Package com.okta.sdk.resource.api
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static com.fasterxml.jackson.databind.ObjectMappervoidrevokeUserSessions(String userId, Boolean oauthTokens, Boolean forgetDevices) Revoke all user sessions Revokes all active identity provider sessions of the user.voidrevokeUserSessions(String userId, Boolean oauthTokens, Boolean forgetDevices, Map<String, String> additionalHeaders) Revoke all user sessions Revokes all active identity provider sessions of the user.voidsetApiClient(ApiClient apiClient)
-
Constructor Details
-
UserSessionsApi
public UserSessionsApi() -
UserSessionsApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
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 ApiExceptionRevoke 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()
-