|
Spring Social | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.social.connect.web.ConnectSupport
public class ConnectSupport
Provides common connect support and utilities for Java web/servlet environments.
Used by ConnectController
and ProviderSignInController
.
Constructor Summary | |
---|---|
ConnectSupport()
|
Method Summary | |
---|---|
java.lang.String |
buildOAuthUrl(ConnectionFactory<?> connectionFactory,
org.springframework.web.context.request.NativeWebRequest request)
Builds the provider URL to redirect the user to for connection authorization. |
java.lang.String |
buildOAuthUrl(ConnectionFactory<?> connectionFactory,
org.springframework.web.context.request.NativeWebRequest request,
org.springframework.util.MultiValueMap<java.lang.String,java.lang.String> additionalParameters)
Builds the provider URL to redirect the user to for connection authorization. |
Connection<?> |
completeConnection(OAuth1ConnectionFactory<?> connectionFactory,
org.springframework.web.context.request.NativeWebRequest request)
Complete the connection to the OAuth1 provider. |
Connection<?> |
completeConnection(OAuth2ConnectionFactory<?> connectionFactory,
org.springframework.web.context.request.NativeWebRequest request)
Complete the connection to the OAuth2 provider. |
void |
setApplicationUrl(java.lang.String applicationUrl)
Configures the base secure URL for the application this controller is being used in e.g. |
void |
setUseAuthenticateUrl(boolean useAuthenticateUrl)
Flag indicating if this instance will support OAuth-based authentication instead of the traditional user authorization. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConnectSupport()
Method Detail |
---|
public void setUseAuthenticateUrl(boolean useAuthenticateUrl)
oauthUrl
return this authenticate URL.
useAuthenticateUrl
- whether to use the authenticat url or notOAuth1Operations.buildAuthenticateUrl(String, OAuth1Parameters)
,
OAuth2Operations.buildAuthenticateUrl(GrantType, OAuth2Parameters)
public void setApplicationUrl(java.lang.String applicationUrl)
https://myapp.com
. Defaults to null.
If specified, will be used to generate OAuth callback URLs.
If not specified, OAuth callback URLs are generated from HttpServletRequests
.
You may wish to set this property if requests into your application flow through a proxy to your application server.
In this case, the HttpServletRequest URI may contain a scheme, host, and/or port value that points to an internal server not appropriate for an external callback URL.
If you have this problem, you can set this property to the base external URL for your application and it will be used to construct the callback URL instead.
applicationUrl
- the application URL valuepublic java.lang.String buildOAuthUrl(ConnectionFactory<?> connectionFactory, org.springframework.web.context.request.NativeWebRequest request)
connectionFactory
- the service provider's connection factory e.g. FacebookConnectionFactoryrequest
- the current web request
java.lang.IllegalArgumentException
- if the connection factory is not OAuth1 based.public java.lang.String buildOAuthUrl(ConnectionFactory<?> connectionFactory, org.springframework.web.context.request.NativeWebRequest request, org.springframework.util.MultiValueMap<java.lang.String,java.lang.String> additionalParameters)
connectionFactory
- the service provider's connection factory e.g. FacebookConnectionFactoryrequest
- the current web requestadditionalParameters
- parameters to add to the authorization URL.
java.lang.IllegalArgumentException
- if the connection factory is not OAuth1 based.public Connection<?> completeConnection(OAuth1ConnectionFactory<?> connectionFactory, org.springframework.web.context.request.NativeWebRequest request)
connectionFactory
- the service provider's connection factory e.g. FacebookConnectionFactoryrequest
- the current web request
public Connection<?> completeConnection(OAuth2ConnectionFactory<?> connectionFactory, org.springframework.web.context.request.NativeWebRequest request)
connectionFactory
- the service provider's connection factory e.g. FacebookConnectionFactoryrequest
- the current web request
|
Spring Social | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |