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 Link icon

    • SessionApi Link icon

      public SessionApi()
    • SessionApi Link icon

      public SessionApi(ApiClient apiClient)
  • Method Details Link icon

    • getApiClient Link icon

      public ApiClient getApiClient()
    • setApiClient Link icon

      public void setApiClient(ApiClient apiClient)
    • createSession Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

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