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 |
|---|---|
void |
afterPropertiesSet() |
protected 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() |
Set<String> |
getReturnToUrlParameters() |
void |
setConnectionFactory(OAuth2ConnectionFactory<S> connectionFactory) |
void |
setDefaultScope(String defaultScope) |
void |
setReturnToUrlParameters(Set<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 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(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 String buildReturnToUrl(javax.servlet.http.HttpServletRequest request)