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