Package com.sanctionco.opconnect
Class OPConnectClientBuilder
java.lang.Object
com.sanctionco.opconnect.OPConnectClientBuilder
A builder class for
OPConnectClient
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds a new instance ofOPConnectClient
.static OPConnectClientBuilder
builder()
Creates a newOPConnectClientBuilder
instance.withAccessToken(String accessToken)
Set the access token to use when making requests to 1Password Connect.withEndpoint(String endpoint)
Set the endpoint to use when connecting to 1Password Connect.withTimeoutInMilliseconds(long timeout)
Set the timeout in milliseconds.
-
Method Details
-
builder
Creates a newOPConnectClientBuilder
instance.- Returns:
- the new
OPConnectClientBuilder
instance
-
withEndpoint
Set the endpoint to use when connecting to 1Password Connect.- Parameters:
endpoint
- the endpoint in URL format- Returns:
- this
-
withAccessToken
Set the access token to use when making requests to 1Password Connect.- Parameters:
accessToken
- the access token- Returns:
- this
-
withTimeoutInMilliseconds
Set the timeout in milliseconds. Default timeout is 10000 milliseconds (10 seconds).- Parameters:
timeout
- the timeout in milliseconds- Returns:
- this
-
build
Builds a new instance ofOPConnectClient
.- Returns:
- the built client
-