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 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, setConnectionCardinality
public 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 InitializingBean
afterPropertiesSet
in class AbstractSocialAuthenticationService<S>
Exception
public SocialAuthenticationToken getAuthToken(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws SocialAuthenticationRedirectException
SocialAuthenticationService
SocialAuthenticationToken
from requestrequest
- current HttpServletRequest
response
- current HttpServletResponse
SocialAuthenticationRedirectException
- if social auth requires a redirect, e.g. OAuthprotected String buildReturnToUrl(javax.servlet.http.HttpServletRequest request)
protected void addCustomParameters(OAuth2Parameters params)