Class OAuth1AuthenticationService<S>
- java.lang.Object
-
- org.springframework.social.security.provider.AbstractSocialAuthenticationService<S>
-
- org.springframework.social.security.provider.OAuth1AuthenticationService<S>
-
- Type Parameters:
S- The provider's API type.
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean,SocialAuthenticationService<S>
public class OAuth1AuthenticationService<S> extends AbstractSocialAuthenticationService<S> implements org.springframework.beans.factory.InitializingBean
- Author:
- Stefan Fussennegger
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.springframework.social.security.provider.SocialAuthenticationService
SocialAuthenticationService.ConnectionCardinality
-
-
Constructor Summary
Constructors Constructor Description OAuth1AuthenticationService(OAuth1ConnectionFactory<S> connectionFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()protected StringbuildReturnToUrl(javax.servlet.http.HttpServletRequest request)SocialAuthenticationTokengetAuthToken(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)extractSocialAuthenticationTokenfrom requestOAuth1ConnectionFactory<S>getConnectionFactory()Set<String>getReturnToUrlParameters()voidsetConnectionFactory(OAuth1ConnectionFactory<S> connectionFactory)voidsetReturnToUrlParameters(Set<String> returnToUrlParameters)-
Methods inherited from class org.springframework.social.security.provider.AbstractSocialAuthenticationService
getConnectionAddedRedirectUrl, getConnectionCardinality, setConnectionAddedRedirectUrl, setConnectionCardinality
-
-
-
-
Constructor Detail
-
OAuth1AuthenticationService
public OAuth1AuthenticationService(OAuth1ConnectionFactory<S> connectionFactory)
-
-
Method Detail
-
getConnectionFactory
public OAuth1ConnectionFactory<S> getConnectionFactory()
- Specified by:
getConnectionFactoryin interfaceSocialAuthenticationService<S>- Returns:
ConnectionFactoryused for authentication
-
setConnectionFactory
public void setConnectionFactory(OAuth1ConnectionFactory<S> connectionFactory)
-
afterPropertiesSet
public void afterPropertiesSet() throws Exception- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Overrides:
afterPropertiesSetin classAbstractSocialAuthenticationService<S>- Throws:
Exception
-
getAuthToken
public SocialAuthenticationToken getAuthToken(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws SocialAuthenticationRedirectException
Description copied from interface:SocialAuthenticationServiceextractSocialAuthenticationTokenfrom request- Specified by:
getAuthTokenin interfaceSocialAuthenticationService<S>- Parameters:
request- currentHttpServletRequestresponse- currentHttpServletResponse- Returns:
- new unauthenticated token or null
- Throws:
SocialAuthenticationRedirectException- if social auth requires a redirect, e.g. OAuth
-
buildReturnToUrl
protected String buildReturnToUrl(javax.servlet.http.HttpServletRequest request)
-
-