Package com.qtsurfer.api.sdk.auth
Record Class AuthOptions
java.lang.Object
java.lang.Record
com.qtsurfer.api.sdk.auth.AuthOptions
- Record Components:
baseUrl- API base URL. Defaults tohttps://api.qtsurfer.com/v1.store- pluggable token store; defaults toInMemoryTokenStore.httpClient- optional customHttpClient.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.-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAuthOptions(URI baseUrl, TokenStore store, HttpClient httpClient, ExecutorService executor) Creates an instance of aAuthOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbaseUrl()Returns the value of thebaseUrlrecord component.static AuthOptions.Builderbuilder()static AuthOptionsdefaults()final booleanIndicates whether some other object is "equal to" this one.executor()Returns the value of theexecutorrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thehttpClientrecord component.store()Returns the value of thestorerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT_BASE_URL
-
-
Constructor Details
-
AuthOptions
Creates an instance of aAuthOptionsrecord class.- Parameters:
baseUrl- the value for thebaseUrlrecord componentstore- the value for thestorerecord componenthttpClient- the value for thehttpClientrecord componentexecutor- the value for theexecutorrecord component
-
-
Method Details
-
defaults
-
builder
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
baseUrl
Returns the value of thebaseUrlrecord component.- Returns:
- the value of the
baseUrlrecord component
-
store
Returns the value of thestorerecord component.- Returns:
- the value of the
storerecord component
-
httpClient
Returns the value of thehttpClientrecord component.- Returns:
- the value of the
httpClientrecord component
-
executor
Returns the value of theexecutorrecord component.- Returns:
- the value of the
executorrecord component
-