Class OAuthRefreshTokenFlow.Builder
java.lang.Object
org.apache.juneau.rest.auth.oauth.flow.OAuthRefreshTokenFlow.Builder
- Enclosing class:
- OAuthRefreshTokenFlow
Builder.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the flow.Sets the OAuth client ID.clientSecret(String value) Sets the OAuth client secret.clientSecretSupplier(Supplier<String> value) Sets the OAuth client secret via a supplier.httpRequestConfigurator(Consumer<com.nimbusds.oauth2.sdk.http.HTTPRequest> value) Sets the HTTP request configurator.httpTimeout(Duration value) Sets the connect/read timeout applied to the token request.refreshToken(String value) Sets the refresh-token value.Sets the RFC 8707resourceindicator sent on the token request.Adds optional scope narrowing.tokenEndpoint(URI value) Sets the token endpoint URL.
-
Constructor Details
-
Builder
protected Builder()Constructor.
-
-
Method Details
-
tokenEndpoint
Sets the token endpoint URL. Required.- Parameters:
value- The endpoint.- Returns:
- This object.
-
clientId
Sets the OAuth client ID. Required.- Parameters:
value- The client ID.- Returns:
- This object.
-
clientSecret
Sets the OAuth client secret. May be omitted for public clients.- Parameters:
value- The secret.- Returns:
- This object.
-
clientSecretSupplier
Sets the OAuth client secret via a supplier.- Parameters:
value- The supplier.- Returns:
- This object.
-
refreshToken
Sets the refresh-token value. Required.- Parameters:
value- The refresh token.- Returns:
- This object.
-
scope
Adds optional scope narrowing.- Parameters:
values- The scopes.- Returns:
- This object.
-
resource
Sets the RFC 8707resourceindicator sent on the token request.- Parameters:
value- The canonical resource URI. Must not benull .- Returns:
- This object.
-
httpTimeout
Sets the connect/read timeout applied to the token request. Default 10 seconds.- Parameters:
value- The timeout. Must not benull and must be positive.- Returns:
- This object.
-
httpRequestConfigurator
public OAuthRefreshTokenFlow.Builder httpRequestConfigurator(Consumer<com.nimbusds.oauth2.sdk.http.HTTPRequest> value) Sets the HTTP request configurator.- Parameters:
value- The callback.- Returns:
- This object.
-
build
Builds the flow.- Returns:
- A new
OAuthRefreshTokenFlow.
-