Package edu.byu.hbll.box.client
Class HttpBoxClient.HttpBoxClientBuilder
java.lang.Object
edu.byu.hbll.box.client.HttpBoxClient.HttpBoxClientBuilder
- Enclosing class:
- HttpBoxClient
Builder for
HttpBoxClient
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaccessTokenUri
(String accessTokenUri) Sets the access token URI for OAuth2.accessTokenUri
(URI accessTokenUri) Sets the access token URI for OAuth2.Initialize to use basic authentication.Initialize to use OAuth2.Sets the base URI of the upstream Box source.Sets the base URI of the upstream Box source.
-
Constructor Details
-
HttpBoxClientBuilder
public HttpBoxClientBuilder()
-
-
Method Details
-
uri
Sets the base URI of the upstream Box source. Should include path to the desired source.- Parameters:
uri
- the base URI of the upstream Box source- Returns:
- this
-
uri
Sets the base URI of the upstream Box source. Should include path to the desired source.- Parameters:
uri
- the base URI of the upstream Box source- Returns:
- this
-
accessTokenUri
Sets the access token URI for OAuth2.- Parameters:
accessTokenUri
- access token URI for OAuth2- Returns:
- this
-
accessTokenUri
Sets the access token URI for OAuth2.- Parameters:
accessTokenUri
- access token URI for OAuth2- Returns:
- this
-
basicAuth
Initialize to use basic authentication.- Parameters:
username
- the usernamepassword
- the password- Returns:
- this
-
oauth2
public HttpBoxClient.HttpBoxClientBuilder oauth2(String accessTokenUri, String clientId, String clientSecret) Initialize to use OAuth2.- Parameters:
accessTokenUri
- the access token URIclientId
- the client IDclientSecret
- the client secret- Returns:
- this
-