Package com.okta.sdk.resource.api
Class SessionApi
java.lang.Object
com.okta.sdk.resource.api.SessionApi
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2024-03-29T16:47:02.065887-05:00[America/Chicago]",
comments="Generator version: 7.4.0")
public class SessionApi
extends Object
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateSession
(CreateSessionRequest createSessionRequest) Create a Session with session token Creates a new Session for a user with a valid session token.createSession
(CreateSessionRequest createSessionRequest, Map<String, String> additionalHeaders) Create a Session with session token Creates a new Session for a user with a valid session token.protected static com.fasterxml.jackson.databind.ObjectMapper
getSession
(String sessionId) Retrieve a Session Retrieves information about the Session specified by the given session IDgetSession
(String sessionId, Map<String, String> additionalHeaders) Retrieve a Session Retrieves information about the Session specified by the given session IDrefreshSession
(String sessionId) Refresh a Session Refreshes an existing Session using the `id` for that Session.refreshSession
(String sessionId, Map<String, String> additionalHeaders) Refresh a Session Refreshes an existing Session using the `id` for that Session.void
revokeSession
(String sessionId) Revoke a Session Revokes the specified Sessionvoid
revokeSession
(String sessionId, Map<String, String> additionalHeaders) Revoke a Session Revokes the specified Sessionvoid
setApiClient
(ApiClient apiClient)
-
Constructor Details
-
SessionApi
public SessionApi() -
SessionApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
createSession
Create a Session with session token Creates a new Session for a user with a valid session token. Use this API if, for example, you want to set the session cookie yourself instead of allowing Okta to set it, or want to hold the session ID to delete a session through the API instead of visiting the logout URL.- Parameters:
createSessionRequest
- (required)- Returns:
- Session
- Throws:
ApiException
- if fails to make API call
-
createSession
public Session createSession(CreateSessionRequest createSessionRequest, Map<String, String> additionalHeaders) throws ApiExceptionCreate a Session with session token Creates a new Session for a user with a valid session token. Use this API if, for example, you want to set the session cookie yourself instead of allowing Okta to set it, or want to hold the session ID to delete a session through the API instead of visiting the logout URL.- Parameters:
createSessionRequest
- (required)additionalHeaders
- additionalHeaders for this call- Returns:
- Session
- Throws:
ApiException
- if fails to make API call
-
getSession
Retrieve a Session Retrieves information about the Session specified by the given session ID- Parameters:
sessionId
- `id` of the Session (required)- Returns:
- Session
- Throws:
ApiException
- if fails to make API call
-
getSession
public Session getSession(String sessionId, Map<String, String> additionalHeaders) throws ApiExceptionRetrieve a Session Retrieves information about the Session specified by the given session ID- Parameters:
sessionId
- `id` of the Session (required)additionalHeaders
- additionalHeaders for this call- Returns:
- Session
- Throws:
ApiException
- if fails to make API call
-
refreshSession
Refresh a Session Refreshes an existing Session using the `id` for that Session. A successful response contains the refreshed Session with an updated `expiresAt` timestamp.- Parameters:
sessionId
- `id` of the Session (required)- Returns:
- Session
- Throws:
ApiException
- if fails to make API call
-
refreshSession
public Session refreshSession(String sessionId, Map<String, String> additionalHeaders) throws ApiExceptionRefresh a Session Refreshes an existing Session using the `id` for that Session. A successful response contains the refreshed Session with an updated `expiresAt` timestamp.- Parameters:
sessionId
- `id` of the Session (required)additionalHeaders
- additionalHeaders for this call- Returns:
- Session
- Throws:
ApiException
- if fails to make API call
-
revokeSession
Revoke a Session Revokes the specified Session- Parameters:
sessionId
- `id` of the Session (required)- Throws:
ApiException
- if fails to make API call
-
revokeSession
public void revokeSession(String sessionId, Map<String, String> additionalHeaders) throws ApiExceptionRevoke a Session Revokes the specified Session- Parameters:
sessionId
- `id` of the Session (required)additionalHeaders
- additionalHeaders for this call- Throws:
ApiException
- if fails to make API call
-
getObjectMapper
protected static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
-