Spring Social

org.springframework.social.security.provider
Class OAuth1AuthenticationService<S>

java.lang.Object
  extended by org.springframework.social.security.provider.AbstractSocialAuthenticationService<S>
      extended by 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
OAuth1AuthenticationService(OAuth1ConnectionFactory<S> connectionFactory)
           
 
Method Summary
 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
 OAuth1ConnectionFactory<S> getConnectionFactory()
           
 java.util.Set<java.lang.String> getReturnToUrlParameters()
           
 void setConnectionFactory(OAuth1ConnectionFactory<S> connectionFactory)
           
 void setReturnToUrlParameters(java.util.Set<java.lang.String> returnToUrlParameters)
           
 
Methods inherited from class org.springframework.social.security.provider.AbstractSocialAuthenticationService
getConnectionAddedRedirectUrl, getConnectionCardinality, setConnectionAddedRedirectUrl, setConnectionCardinality
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OAuth1AuthenticationService

public OAuth1AuthenticationService(OAuth1ConnectionFactory<S> connectionFactory)
Method Detail

getConnectionFactory

public OAuth1ConnectionFactory<S> getConnectionFactory()
Specified by:
getConnectionFactory in interface SocialAuthenticationService<S>
Returns:
ConnectionFactory used for authentication

setConnectionFactory

public void setConnectionFactory(OAuth1ConnectionFactory<S> connectionFactory)

setReturnToUrlParameters

public void setReturnToUrlParameters(java.util.Set<java.lang.String> returnToUrlParameters)

getReturnToUrlParameters

public java.util.Set<java.lang.String> getReturnToUrlParameters()

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Overrides:
afterPropertiesSet in class AbstractSocialAuthenticationService<S>
Throws:
java.lang.Exception

getAuthToken

public SocialAuthenticationToken getAuthToken(javax.servlet.http.HttpServletRequest request,
                                              javax.servlet.http.HttpServletResponse response)
                                       throws SocialAuthenticationRedirectException
Description copied from interface: SocialAuthenticationService
extract SocialAuthenticationToken from request

Specified by:
getAuthToken in interface SocialAuthenticationService<S>
Parameters:
request - current HttpServletRequest
response - current HttpServletResponse
Returns:
new unauthenticated token or null
Throws:
SocialAuthenticationRedirectException - if social auth requires a redirect, e.g. OAuth

buildReturnToUrl

protected java.lang.String buildReturnToUrl(javax.servlet.http.HttpServletRequest request)

Spring Social