Class BasicAuthInterceptor.Builder
java.lang.Object
com.helixframework.okhttp.basicauth.BasicAuthInterceptor.Builder
- Enclosing class:
- BasicAuthInterceptor
Builder for creating new instances of
BasicAuthInterceptor.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates a new instance ofBasicAuthInterceptor.credentials(String username, String password) Sets the username and password that will be used for authentication.credentialsStore(BasicAuthCredentialsStore credentialsStore) Sets theBasicAuthCredentialsStoreimplementation that will be used to retrieve the credentials at runtime.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
credentials
Sets the username and password that will be used for authentication.- Parameters:
username- usernamepassword- password- Returns:
BasicAuthInterceptor.Builder
-
credentialsStore
Sets theBasicAuthCredentialsStoreimplementation that will be used to retrieve the credentials at runtime.- Parameters:
credentialsStore- credentials store- Returns:
BasicAuthInterceptor.Builder
-
build
Creates a new instance ofBasicAuthInterceptor.- Returns:
- a
BasicAuthInterceptor - Throws:
IllegalArgumentException- when validation of the builder parameters fails
-