S - The provider's API type.public class OAuth2AuthenticationService<S> extends AbstractSocialAuthenticationService<S>
SocialAuthenticationService.ConnectionCardinality| Modifier and Type | Field and Description |
|---|---|
protected org.apache.commons.logging.Log |
logger |
| Constructor and Description |
|---|
OAuth2AuthenticationService(org.springframework.social.connect.support.OAuth2ConnectionFactory<S> connectionFactory) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addCustomParameters(org.springframework.social.oauth2.OAuth2Parameters params) |
void |
afterPropertiesSet() |
protected String |
buildReturnToUrl(HttpServletRequest request) |
SocialAuthenticationToken |
getAuthToken(HttpServletRequest request,
HttpServletResponse response)
extract
SocialAuthenticationToken from request |
org.springframework.social.connect.support.OAuth2ConnectionFactory<S> |
getConnectionFactory() |
protected StringBuffer |
getProxyHeaderAwareRequestURL(HttpServletRequest request) |
Set<String> |
getReturnToUrlParameters() |
void |
setConnectionFactory(org.springframework.social.connect.support.OAuth2ConnectionFactory<S> connectionFactory) |
void |
setDefaultScope(String defaultScope) |
void |
setReturnToUrlParameters(Set<String> returnToUrlParameters) |
getConnectionAddedRedirectUrl, getConnectionCardinality, setConnectionAddedRedirectUrl, setConnectionCardinalitypublic OAuth2AuthenticationService(org.springframework.social.connect.support.OAuth2ConnectionFactory<S> connectionFactory)
public org.springframework.social.connect.support.OAuth2ConnectionFactory<S> getConnectionFactory()
ConnectionFactory used for authenticationpublic void setConnectionFactory(org.springframework.social.connect.support.OAuth2ConnectionFactory<S> connectionFactory)
public void setDefaultScope(String defaultScope)
defaultScope - OAuth scope to use, i.e. requested permissionspublic void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface InitializingBeanafterPropertiesSet in class AbstractSocialAuthenticationService<S>Exceptionpublic SocialAuthenticationToken getAuthToken(HttpServletRequest request, HttpServletResponse response) throws SocialAuthenticationRedirectException
SocialAuthenticationServiceSocialAuthenticationToken from requestrequest - current HttpServletRequestresponse - current HttpServletResponseSocialAuthenticationRedirectException - if social auth requires a redirect, e.g. OAuthprotected String buildReturnToUrl(HttpServletRequest request)
protected StringBuffer getProxyHeaderAwareRequestURL(HttpServletRequest request)
protected void addCustomParameters(org.springframework.social.oauth2.OAuth2Parameters params)