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-09-23T08:35:59.300824-05:00[America/Chicago]",
comments="Generator version: 7.8.0")
public class SessionApi
extends Object
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
closeCurrentSession
(String cookie) Close the current Session Closes the Session for the user who is currently signed in.void
closeCurrentSession
(String cookie, Map<String, String> additionalHeaders) Close the current Session Closes the Session for the user who is currently signed in.createSession
(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.getCurrentSession
(String cookie) Retrieve the current Session Retrieves Session information for the current user.getCurrentSession
(String cookie, Map<String, String> additionalHeaders) Retrieve the current Session Retrieves Session information for the current user.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 IDrefreshCurrentSession
(String cookie) Refresh the current Session Refreshes the Session for the current user > **Note:** This operation requires a session cookie for the user.refreshCurrentSession
(String cookie, Map<String, String> additionalHeaders) Refresh the current Session Refreshes the Session for the current user > **Note:** This operation requires a session cookie for the user.refreshSession
(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
-
closeCurrentSession
Close the current Session Closes the Session for the user who is currently signed in. Use this method in a browser-based application to sign out a user. > **Note:** This operation requires a session cookie for the user. An API token isn't allowed for this operation.- Parameters:
cookie
- (optional)- Throws:
ApiException
- if fails to make API call
-
closeCurrentSession
public void closeCurrentSession(String cookie, Map<String, String> additionalHeaders) throws ApiExceptionClose the current Session Closes the Session for the user who is currently signed in. Use this method in a browser-based application to sign out a user. > **Note:** This operation requires a session cookie for the user. An API token isn't allowed for this operation.- Parameters:
cookie
- (optional)additionalHeaders
- additionalHeaders for this call- Throws:
ApiException
- if fails to make API call
-
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
-
getCurrentSession
Retrieve the current Session Retrieves Session information for the current user. Use this method in a browser-based application to determine if the user is signed in. > **Note:** This operation requires a session cookie for the user. An API token isn't allowed for this operation.- Parameters:
cookie
- (optional)- Returns:
- Session
- Throws:
ApiException
- if fails to make API call
-
getCurrentSession
public Session getCurrentSession(String cookie, Map<String, String> additionalHeaders) throws ApiExceptionRetrieve the current Session Retrieves Session information for the current user. Use this method in a browser-based application to determine if the user is signed in. > **Note:** This operation requires a session cookie for the user. An API token isn't allowed for this operation.- Parameters:
cookie
- (optional)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
-
refreshCurrentSession
Refresh the current Session Refreshes the Session for the current user > **Note:** This operation requires a session cookie for the user. An API token isn't allowed for this operation.- Parameters:
cookie
- (optional)- Returns:
- Session
- Throws:
ApiException
- if fails to make API call
-
refreshCurrentSession
public Session refreshCurrentSession(String cookie, Map<String, String> additionalHeaders) throws ApiExceptionRefresh the current Session Refreshes the Session for the current user > **Note:** This operation requires a session cookie for the user. An API token isn't allowed for this operation.- Parameters:
cookie
- (optional)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()
-