Class ClientCredential.ClientCredentialBuilder
- Enclosing class:
ClientCredential
ClientCredential.ClientCredentialBuilder
which is used to build instance of ClientCredential
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaccessToken
(String accessToken) Sets an access token representing authorizations a client has for OPEN API service.build()
Returns a newly-created immutable client credential.clientSecret
(String clientSecret) Sets a secret associated with a client token.clientToken
(String clientToken) Sets a token representing an OPEN API service client.headersToSign
(Set<String> headersToSign) Adds all ofheadersToSign
into the builder's internal collection.headerToSign
(String headerName) AddsheaderName
into the builder's internal collection.Sets a hostname to be used when making OPEN API requests with this credential.maxBodySize
(int maxBodySize) Sets the maximum body size that will be used for producing request signatures.
-
Constructor Details
-
ClientCredentialBuilder
public ClientCredentialBuilder()Creates a new builder. The returned builder is equivalent to the builder generated byClientCredential.builder()
.
-
-
Method Details
-
clientToken
Sets a token representing an OPEN API service client.- Parameters:
clientToken
- a client token- Returns:
- reference back to this builder instance
-
clientSecret
Sets a secret associated with a client token.- Parameters:
clientSecret
- a client secret- Returns:
- reference back to this builder instance
-
accessToken
Sets an access token representing authorizations a client has for OPEN API service.- Parameters:
accessToken
- an access token- Returns:
- reference back to this builder instance
-
headersToSign
Adds all of
headersToSign
into the builder's internal collection. This can be called multiple times to continue adding them. The set passed in is not stored directly, a copy is made instead.NOTE: All header names are lower-cased for storage. In HTTP, header names are case-insensitive anyway, and EdgeGrid does not support multiple headers with the same name. Forcing to lowercase here improves our chance of detecting bad requests early.
- Parameters:
headersToSign
- aSet
of header names- Returns:
- reference back to this builder instance
-
headerToSign
Adds
headerName
into the builder's internal collection. This can be called multiple times to continue adding them.NOTE: All header names are lower-cased for storage. In HTTP, header names are case-insensitive anyway, and EdgeGrid does not support multiple headers with the same name. Forcing to lowercase here improves our chance of detecting bad requests early.
- Parameters:
headerName
- a header name- Returns:
- reference back to this builder instance
-
host
Sets a hostname to be used when making OPEN API requests with this credential.- Parameters:
host
- a host name- Returns:
- reference back to this builder instance
-
maxBodySize
Sets the maximum body size that will be used for producing request signatures.- Parameters:
maxBodySize
- a number of bytes- Returns:
- reference back to this builder instance
-
build
Returns a newly-created immutable client credential.- Returns:
- reference back to this builder instance
-