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 Details

    • SessionApi

      public SessionApi()
    • SessionApi

      public SessionApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • createSession

      public Session createSession(CreateSessionRequest createSessionRequest) throws ApiException
      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 ApiException
      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)
      additionalHeaders - additionalHeaders for this call
      Returns:
      Session
      Throws:
      ApiException - if fails to make API call
    • getSession

      public Session getSession(String sessionId) throws ApiException
      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 ApiException
      Retrieve 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

      public Session refreshSession(String sessionId) throws ApiException
      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 ApiException
      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)
      additionalHeaders - additionalHeaders for this call
      Returns:
      Session
      Throws:
      ApiException - if fails to make API call
    • revokeSession

      public void revokeSession(String sessionId) throws ApiException
      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 ApiException
      Revoke 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()