Class OAuth1AuthorizationFlowImpl.Builder
java.lang.Object
org.glassfish.jersey.client.oauth1.OAuth1AuthorizationFlowImpl.Builder
- All Implemented Interfaces:
OAuth1Builder.FlowBuilder
- Enclosing class:
OAuth1AuthorizationFlowImpl
static class OAuth1AuthorizationFlowImpl.Builder
extends Object
implements OAuth1Builder.FlowBuilder
OAuth1AuthorizationFlowImpl builder.
- Since:
- 2.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate Stringprivate Stringprivate javax.ws.rs.client.Clientprivate booleanprivate final OAuth1Parametersprivate Stringprivate final OAuth1Secrets -
Constructor Summary
ConstructorsConstructorDescriptionBuilder(OAuth1Parameters params, OAuth1Secrets secrets, String requestTokenUri, String accessTokenUri, String authorizationUri) Create a new builder. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build theOAuth1AuthorizationFlow.callbackUri(String callbackUri) Set the callback URI to which the user (resource owner) should be redirected after he/she grants access to this application.client(javax.ws.rs.client.Client client) Set the client that should be used internally by theOAuth1AuthorizationFlowto make requests to Authorization Server.Enable logging (headers and entities) of OAuth requests and responses.
-
Field Details
-
params
-
secrets
-
requestTokenUri
-
accessTokenUri
-
authorizationUri
-
client
private javax.ws.rs.client.Client client -
callbackUri
-
enableLogging
private boolean enableLogging
-
-
Constructor Details
-
Builder
public Builder(OAuth1Parameters params, OAuth1Secrets secrets, String requestTokenUri, String accessTokenUri, String authorizationUri) Create a new builder.- Parameters:
params- Pre-configured oauth parameters.secrets- Pre-configured oauth secrets.requestTokenUri- Request token uri.accessTokenUri- Access token uri.authorizationUri- Authorization uri.
-
-
Method Details
-
callbackUri
Description copied from interface:OAuth1Builder.FlowBuilderSet the callback URI to which the user (resource owner) should be redirected after he/she grants access to this application. In most cases, the URI is under control of this application and request done on this URI will be used to extract query parameterverifierthat will be used inOAuth1AuthorizationFlow.finish(String)method.If URI is not defined by this method, the default value
oobwill be used in the Authorization Flow which should cause thatverifierwill be passed to application in other way than request redirection (for example shown to the user using html page).- Specified by:
callbackUriin interfaceOAuth1Builder.FlowBuilder- Parameters:
callbackUri- URI that should receive authorization response from the Service Provider.- Returns:
- this builder.
-
client
Description copied from interface:OAuth1Builder.FlowBuilderSet the client that should be used internally by theOAuth1AuthorizationFlowto make requests to Authorization Server. If this method is not called, it is up to the implementation to create or get any private client instance to perform these requests. This method could be used mainly for performance reasons to avoid creation of new client instances and have control about created client instances used in the application.- Specified by:
clientin interfaceOAuth1Builder.FlowBuilder- Parameters:
client- Client instance.- Returns:
- this builder.
-
enableLogging
Description copied from interface:OAuth1Builder.FlowBuilderEnable logging (headers and entities) of OAuth requests and responses.- Specified by:
enableLoggingin interfaceOAuth1Builder.FlowBuilder- Returns:
- this builder.
-
build
Description copied from interface:OAuth1Builder.FlowBuilderBuild theOAuth1AuthorizationFlow.- Specified by:
buildin interfaceOAuth1Builder.FlowBuilder- Returns:
- Authorization flow.
-