org.springframework.security.oauth.provider.filter
Class UserAuthorizationProcessingFilter

java.lang.Object
  extended by org.springframework.web.filter.GenericFilterBean
      extended by org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
          extended by org.springframework.security.oauth.provider.filter.UserAuthorizationProcessingFilter
All Implemented Interfaces:
Filter, Aware, BeanNameAware, DisposableBean, InitializingBean, ApplicationEventPublisherAware, EnvironmentAware, MessageSourceAware, ServletContextAware

public class UserAuthorizationProcessingFilter
extends org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter

Processing filter for handling a request to authenticate an OAuth request token. The default processes URL is "/oauth_authenticate_token"

This filter looks for one request parameter for the token id that is being authorized. The default name of the paramaters is "requestToken", but this can be configured.

Author:
Ryan Heaton, Andrew McCall

Field Summary
protected static String CALLBACK_ATTRIBUTE
           
protected static String VERIFIER_ATTRIBUTE
           
 
Fields inherited from class org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
authenticationDetailsSource, eventPublisher, messages, SPRING_SECURITY_LAST_EXCEPTION_KEY
 
Fields inherited from class org.springframework.web.filter.GenericFilterBean
logger
 
Constructor Summary
UserAuthorizationProcessingFilter()
           
UserAuthorizationProcessingFilter(String defaultProcessesUrl)
           
 
Method Summary
 void afterPropertiesSet()
           
 org.springframework.security.core.Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response)
           
 String getTokenParameterName()
          The name of the request parameter that supplies the token id.
 OAuthProviderTokenServices getTokenServices()
          Get the OAuth token services.
 OAuthVerifierServices getVerifierServices()
          The verifier services to use.
 boolean isRequire10a()
          Whether to require 1.0a support.
 void setRequire10a(boolean require10a)
          Whether to require 1.0a support.
 void setTokenIdParameterName(String tokenIdParameterName)
          The name of the request parameter that supplies the token id.
 void setTokenServices(OAuthProviderTokenServices tokenServices)
          The OAuth token services.
 void setVerifierServices(OAuthVerifierServices verifierServices)
          The verifier services to use.
 
Methods inherited from class org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
doFilter, getAllowSessionCreation, getAuthenticationManager, getFailureHandler, getFilterProcessesUrl, getRememberMeServices, getSuccessHandler, requiresAuthentication, setAllowSessionCreation, setApplicationEventPublisher, setAuthenticationDetailsSource, setAuthenticationFailureHandler, setAuthenticationManager, setAuthenticationSuccessHandler, setContinueChainBeforeSuccessfulAuthentication, setFilterProcessesUrl, setMessageSource, setRememberMeServices, setSessionAuthenticationStrategy, successfulAuthentication, successfulAuthentication, unsuccessfulAuthentication
 
Methods inherited from class org.springframework.web.filter.GenericFilterBean
addRequiredProperty, destroy, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CALLBACK_ATTRIBUTE

protected static final String CALLBACK_ATTRIBUTE

VERIFIER_ATTRIBUTE

protected static final String VERIFIER_ATTRIBUTE
Constructor Detail

UserAuthorizationProcessingFilter

public UserAuthorizationProcessingFilter()

UserAuthorizationProcessingFilter

public UserAuthorizationProcessingFilter(String defaultProcessesUrl)
Method Detail

afterPropertiesSet

public void afterPropertiesSet()
Specified by:
afterPropertiesSet in interface InitializingBean
Overrides:
afterPropertiesSet in class org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter

attemptAuthentication

public org.springframework.security.core.Authentication attemptAuthentication(HttpServletRequest request,
                                                                              HttpServletResponse response)
                                                                       throws org.springframework.security.core.AuthenticationException
Specified by:
attemptAuthentication in class org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
Throws:
org.springframework.security.core.AuthenticationException

getTokenParameterName

public String getTokenParameterName()
The name of the request parameter that supplies the token id.

Returns:
The name of the request parameter that supplies the token id.

setTokenIdParameterName

public void setTokenIdParameterName(String tokenIdParameterName)
The name of the request parameter that supplies the token id.

Parameters:
tokenIdParameterName - The name of the request parameter that supplies the token id.

getTokenServices

public OAuthProviderTokenServices getTokenServices()
Get the OAuth token services.

Returns:
The OAuth token services.

setTokenServices

@Autowired
public void setTokenServices(OAuthProviderTokenServices tokenServices)
The OAuth token services.

Parameters:
tokenServices - The OAuth token services.

getVerifierServices

public OAuthVerifierServices getVerifierServices()
The verifier services to use.

Returns:
The verifier services to use.

setVerifierServices

@Autowired
public void setVerifierServices(OAuthVerifierServices verifierServices)
The verifier services to use.

Parameters:
verifierServices - The verifier services to use.

isRequire10a

public boolean isRequire10a()
Whether to require 1.0a support.

Returns:
Whether to require 1.0a support.

setRequire10a

public void setRequire10a(boolean require10a)
Whether to require 1.0a support.

Parameters:
require10a - Whether to require 1.0a support.


Copyright © 2012. All Rights Reserved.