org.springframework.security.oauth2.provider.error
Class AbstractOAuth2SecurityExceptionHandler

java.lang.Object
  extended by org.springframework.security.oauth2.provider.error.AbstractOAuth2SecurityExceptionHandler
Direct Known Subclasses:
OAuth2AccessDeniedHandler, OAuth2AuthenticationEntryPoint

public abstract class AbstractOAuth2SecurityExceptionHandler
extends Object

Convenient base class containing utility methods and dependency setters for security error handling concerns specific to OAuth2 resources.

Author:
Dave Syer

Field Summary
protected  Log logger
          Logger available to subclasses
 
Constructor Summary
AbstractOAuth2SecurityExceptionHandler()
           
 
Method Summary
protected  void doHandle(HttpServletRequest request, HttpServletResponse response, Exception authException)
           
protected  org.springframework.http.ResponseEntity<OAuth2Exception> enhanceResponse(org.springframework.http.ResponseEntity<OAuth2Exception> result, Exception authException)
          Allow subclasses to manipulate the response before it is rendered.
 void setExceptionRenderer(OAuth2ExceptionRenderer exceptionRenderer)
           
 void setExceptionTranslator(WebResponseExceptionTranslator exceptionTranslator)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final Log logger
Logger available to subclasses

Constructor Detail

AbstractOAuth2SecurityExceptionHandler

public AbstractOAuth2SecurityExceptionHandler()
Method Detail

setExceptionTranslator

public void setExceptionTranslator(WebResponseExceptionTranslator exceptionTranslator)

setExceptionRenderer

public void setExceptionRenderer(OAuth2ExceptionRenderer exceptionRenderer)

doHandle

protected final void doHandle(HttpServletRequest request,
                              HttpServletResponse response,
                              Exception authException)
                       throws IOException,
                              ServletException
Throws:
IOException
ServletException

enhanceResponse

protected org.springframework.http.ResponseEntity<OAuth2Exception> enhanceResponse(org.springframework.http.ResponseEntity<OAuth2Exception> result,
                                                                                   Exception authException)
Allow subclasses to manipulate the response before it is rendered.

Parameters:
result - the response that was generated by the exception translator.
authException - the authentication exception that is being handled


Copyright © 2012. All Rights Reserved.