|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.jersey.client.oauth2.OAuth2FlowGoogleBuilder
public class OAuth2FlowGoogleBuilder
Class that provides methods to build OAuth2CodeGrantFlow pre-configured for usage
with Google provider.
| Nested Class Summary | |
|---|---|
static class |
OAuth2FlowGoogleBuilder.AccessType
Enum that defines values for "access_type" parameter used in Google OAuth flow. |
static class |
OAuth2FlowGoogleBuilder.Display
Enum that defines values for "display" parameter used in Google OAuth flow. |
static class |
OAuth2FlowGoogleBuilder.Prompt
Enum that defines values for "prompt" parameter used in Google OAuth flow. |
| Field Summary | |
|---|---|
static String |
LOGIN_HINT
Property key that defines values for "login_hint" parameter used in Google OAuth flow. |
| Method Summary | |
|---|---|
T |
accessTokenUri(String accessTokenUri)
Set the access token URI on which the access token can be requested. |
OAuth2FlowGoogleBuilder |
accessType(OAuth2FlowGoogleBuilder.AccessType accessType)
Set access type parameter used in Authorization Request. |
T |
authorizationUri(String authorizationUri)
Set the URI to which the user should be redirected to authorize our application. |
OAuth2CodeGrantFlow |
build()
Build the OAuth2CodeGrantFlow instance. |
T |
client(javax.ws.rs.client.Client client)
Set the client that should be used internally by the OAuth1AuthorizationFlow to make requests to
Authorization Server. |
T |
clientIdentifier(ClientIdentifier consumerCredentials)
Set client identifier of the application that should be authorized. |
OAuth2FlowGoogleBuilder |
display(OAuth2FlowGoogleBuilder.Display display)
Set display parameter used in Authorization Request. |
OAuth2FlowGoogleBuilder |
loginHint(String loginHint)
Set login hint parameter used in Authorization Request. |
OAuth2FlowGoogleBuilder |
prompt(OAuth2FlowGoogleBuilder.Prompt prompt)
Set prompt parameter used in Authorization Request. |
T |
property(OAuth2CodeGrantFlow.Phase phase,
String key,
String value)
Set property (parameter) that will be added to requests or URIs as a query parameters during the Authorization Flow. |
T |
redirectUri(String redirectUri)
Set the redirect URI to which the user (resource owner) should be redirected after he/she grants access to our application. |
T |
refreshTokenUri(String refreshTokenUri)
Set the refresh token URI on which the access token can be refreshed using a refresh token. |
T |
scope(String scope)
Set a scope to which the application will get authorization grant. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String LOGIN_HINT
| Method Detail |
|---|
public OAuth2FlowGoogleBuilder accessType(OAuth2FlowGoogleBuilder.AccessType accessType)
access type parameter used in Authorization Request.
accessType - access type value.
public OAuth2FlowGoogleBuilder prompt(OAuth2FlowGoogleBuilder.Prompt prompt)
prompt parameter used in Authorization Request.
prompt - Prompt value.
public OAuth2FlowGoogleBuilder display(OAuth2FlowGoogleBuilder.Display display)
display parameter used in Authorization Request.
display - display value.
public OAuth2FlowGoogleBuilder loginHint(String loginHint)
login hint parameter used in Authorization Request.
loginHint - login hint value.
public T accessTokenUri(String accessTokenUri)
OAuth2CodeGrantFlow.Builder
accessTokenUri in interface OAuth2CodeGrantFlow.Builder<T extends OAuth2CodeGrantFlow.Builder>accessTokenUri - Access token URI.
public T authorizationUri(String authorizationUri)
OAuth2CodeGrantFlow.Builder
authorizationUri in interface OAuth2CodeGrantFlow.Builder<T extends OAuth2CodeGrantFlow.Builder>authorizationUri - Authorization URI.
public T redirectUri(String redirectUri)
OAuth2CodeGrantFlow.Buildercode and state
that will be used in
OAuth2CodeGrantFlow.finish(String, String) method.
If URI is not defined by this method, the default value urn:ietf:wg:oauth:2.0:oob will be used
in the Authorization
Flow which should cause that code will be passed to application in other way than request
redirection (for example shown to the user using html page).
redirectUri in interface OAuth2CodeGrantFlow.Builder<T extends OAuth2CodeGrantFlow.Builder>redirectUri - URI that should receive authorization response from the Service Provider.
public T clientIdentifier(ClientIdentifier consumerCredentials)
OAuth2CodeGrantFlow.Builder
clientIdentifier in interface OAuth2CodeGrantFlow.Builder<T extends OAuth2CodeGrantFlow.Builder>consumerCredentials - Client identifier.
public T scope(String scope)
OAuth2CodeGrantFlow.BuilderThe parameter is optional but ServiceProvider might require it.
scope in interface OAuth2CodeGrantFlow.Builder<T extends OAuth2CodeGrantFlow.Builder>scope - Scope string.
public T client(javax.ws.rs.client.Client client)
OAuth2CodeGrantFlow.BuilderOAuth1AuthorizationFlow to 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.
client in interface OAuth2CodeGrantFlow.Builder<T extends OAuth2CodeGrantFlow.Builder>client - Client instance.
public T refreshTokenUri(String refreshTokenUri)
OAuth2CodeGrantFlow.BuilderOAuth2CodeGrantFlow.Builder.accessTokenUri(String) (which is the default value
defined by the OAuth2 spec).
Some providers do not support
refreshing access tokens at all.
refreshTokenUri in interface OAuth2CodeGrantFlow.Builder<T extends OAuth2CodeGrantFlow.Builder>refreshTokenUri - Refresh token URI.
public T property(OAuth2CodeGrantFlow.Phase phase,
String key,
String value)
OAuth2CodeGrantFlow.Builder
property in interface OAuth2CodeGrantFlow.Builder<T extends OAuth2CodeGrantFlow.Builder>phase - Phase of the flow in which the properties (parameters) should be used. For example by using
a OAuth2CodeGrantFlow.Phase.ACCESS_TOKEN_REQUEST, the parameter will be added only to the http request
for access token.key - Property key.value - Property value.
public OAuth2CodeGrantFlow build()
OAuth2CodeGrantFlow.BuilderOAuth2CodeGrantFlow instance.
build in interface OAuth2CodeGrantFlow.Builder<T extends OAuth2CodeGrantFlow.Builder>OAuth2CodeGrantFlow.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||