Record Class AuthOptions

java.lang.Object
java.lang.Record
com.qtsurfer.api.sdk.auth.AuthOptions
Record Components:
baseUrl - API base URL. Defaults to https://api.qtsurfer.com/v1.
store - pluggable token store; defaults to InMemoryTokenStore.
httpClient - optional custom HttpClient.
executor - executor that runs the async workflow.

public record AuthOptions(URI baseUrl, TokenStore store, HttpClient httpClient, ExecutorService executor) extends Record
Configuration for AuthenticatedClient. Mirrors QTSurferOptions but replaces the static token with a pluggable TokenStore.
  • Field Details

    • DEFAULT_BASE_URL

      public static final URI DEFAULT_BASE_URL
  • Constructor Details

    • AuthOptions

      public AuthOptions(URI baseUrl, TokenStore store, HttpClient httpClient, ExecutorService executor)
      Creates an instance of a AuthOptions record class.
      Parameters:
      baseUrl - the value for the baseUrl record component
      store - the value for the store record component
      httpClient - the value for the httpClient record component
      executor - the value for the executor record component
  • Method Details

    • defaults

      public static AuthOptions defaults()
    • builder

      public static AuthOptions.Builder builder()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • baseUrl

      public URI baseUrl()
      Returns the value of the baseUrl record component.
      Returns:
      the value of the baseUrl record component
    • store

      public TokenStore store()
      Returns the value of the store record component.
      Returns:
      the value of the store record component
    • httpClient

      public HttpClient httpClient()
      Returns the value of the httpClient record component.
      Returns:
      the value of the httpClient record component
    • executor

      public ExecutorService executor()
      Returns the value of the executor record component.
      Returns:
      the value of the executor record component