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(OAuth2ConnectionFactory<S> connectionFactory) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addCustomParameters(OAuth2Parameters params) |
void |
afterPropertiesSet() |
protected java.lang.String |
buildReturnToUrl(javax.servlet.http.HttpServletRequest request) |
SocialAuthenticationToken |
getAuthToken(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
extract
SocialAuthenticationToken from request |
OAuth2ConnectionFactory<S> |
getConnectionFactory() |
java.util.Set<java.lang.String> |
getReturnToUrlParameters() |
void |
setConnectionFactory(OAuth2ConnectionFactory<S> connectionFactory) |
void |
setDefaultScope(java.lang.String defaultScope) |
void |
setReturnToUrlParameters(java.util.Set<java.lang.String> returnToUrlParameters) |
getConnectionAddedRedirectUrl, getConnectionCardinality, setConnectionAddedRedirectUrl, setConnectionCardinalitypublic OAuth2AuthenticationService(OAuth2ConnectionFactory<S> connectionFactory)
public OAuth2ConnectionFactory<S> getConnectionFactory()
ConnectionFactory used for authenticationpublic void setConnectionFactory(OAuth2ConnectionFactory<S> connectionFactory)
public void setReturnToUrlParameters(java.util.Set<java.lang.String> returnToUrlParameters)
public java.util.Set<java.lang.String> getReturnToUrlParameters()
public void setDefaultScope(java.lang.String defaultScope)
defaultScope - OAuth scope to use, i.e. requested permissionspublic void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanafterPropertiesSet in class AbstractSocialAuthenticationService<S>java.lang.Exceptionpublic SocialAuthenticationToken getAuthToken(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws SocialAuthenticationRedirectException
SocialAuthenticationServiceSocialAuthenticationToken from requestrequest - current HttpServletRequestresponse - current HttpServletResponseSocialAuthenticationRedirectException - if social auth requires a redirect, e.g. OAuthprotected java.lang.String buildReturnToUrl(javax.servlet.http.HttpServletRequest request)
protected void addCustomParameters(OAuth2Parameters params)