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

java.lang.Object
  extended by org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler
      extended by org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler
          extended by org.springframework.security.oauth.provider.filter.UserAuthorizationSuccessfulAuthenticationHandler
All Implemented Interfaces:
org.springframework.security.web.authentication.AuthenticationSuccessHandler

public class UserAuthorizationSuccessfulAuthenticationHandler
extends org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler

Successful AuthenticationHandler that gets called when a user complete authorization of a resource. If the callback URL is oob, the request is handled by the SimpleUrlAuthenticationSuccessHandler using the default success URL. Otherwise, the oauth_verifier and oauth_token parmeters are appended to the callback URL and the user is redirected.

Author:
Andrew McCall

Field Summary
 
Fields inherited from class org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler
logger
 
Constructor Summary
UserAuthorizationSuccessfulAuthenticationHandler()
           
UserAuthorizationSuccessfulAuthenticationHandler(String s)
           
 
Method Summary
 String getCallbackParameterName()
          The name of the request parameter that supplies the callback URL.
 String getTokenParameterName()
          The name of the request parameter that supplies the token id.
 boolean isRequire10a()
          Whether to require 1.0a support.
 void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, org.springframework.security.core.Authentication authentication)
           
 void setCallbackParameterName(String callbackParameterName)
          The name of the request parameter that supplies the callback URL.
 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.
 
Methods inherited from class org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler
clearAuthenticationAttributes
 
Methods inherited from class org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler
determineTargetUrl, getDefaultTargetUrl, getRedirectStrategy, getTargetUrlParameter, handle, isAlwaysUseDefaultTargetUrl, setAlwaysUseDefaultTargetUrl, setDefaultTargetUrl, setRedirectStrategy, setTargetUrlParameter, setUseReferer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserAuthorizationSuccessfulAuthenticationHandler

public UserAuthorizationSuccessfulAuthenticationHandler()

UserAuthorizationSuccessfulAuthenticationHandler

public UserAuthorizationSuccessfulAuthenticationHandler(String s)
Method Detail

onAuthenticationSuccess

public void onAuthenticationSuccess(HttpServletRequest request,
                                    HttpServletResponse response,
                                    org.springframework.security.core.Authentication authentication)
                             throws IOException,
                                    ServletException
Specified by:
onAuthenticationSuccess in interface org.springframework.security.web.authentication.AuthenticationSuccessHandler
Overrides:
onAuthenticationSuccess in class org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler
Throws:
IOException
ServletException

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.

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.

getCallbackParameterName

public String getCallbackParameterName()
The name of the request parameter that supplies the callback URL.

Returns:
The name of the request parameter that supplies the callback URL.

setCallbackParameterName

public void setCallbackParameterName(String callbackParameterName)
The name of the request parameter that supplies the callback URL.

Parameters:
callbackParameterName - The name of the request parameter that supplies the callback URL.


Copyright © 2012. All Rights Reserved.