org.springframework.security.oauth2.provider.error
Class OAuth2AuthenticationEntryPoint
java.lang.Object
org.springframework.security.oauth2.provider.error.AbstractOAuth2SecurityExceptionHandler
org.springframework.security.oauth2.provider.error.OAuth2AuthenticationEntryPoint
- All Implemented Interfaces:
- org.springframework.security.web.AuthenticationEntryPoint
public class OAuth2AuthenticationEntryPoint
- extends AbstractOAuth2SecurityExceptionHandler
- implements org.springframework.security.web.AuthenticationEntryPoint
If authentication fails and the caller has asked for a specific content type response, this entry point can send one,
along with a standard 401 status. Add to the Spring Security configuration as an AuthenticationEntryPoint in
the usual way.
- Author:
- Dave Syer
|
Method Summary |
void |
commence(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.security.core.AuthenticationException authException)
|
protected org.springframework.http.ResponseEntity<OAuth2Exception> |
enhanceResponse(org.springframework.http.ResponseEntity<OAuth2Exception> response,
Exception exception)
Allow subclasses to manipulate the response before it is rendered. |
void |
setRealmName(String realmName)
|
void |
setTypeName(String typeName)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OAuth2AuthenticationEntryPoint
public OAuth2AuthenticationEntryPoint()
setRealmName
public void setRealmName(String realmName)
setTypeName
public void setTypeName(String typeName)
commence
public void commence(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.security.core.AuthenticationException authException)
throws IOException,
javax.servlet.ServletException
- Specified by:
commence in interface org.springframework.security.web.AuthenticationEntryPoint
- Throws:
IOException
javax.servlet.ServletException
enhanceResponse
protected org.springframework.http.ResponseEntity<OAuth2Exception> enhanceResponse(org.springframework.http.ResponseEntity<OAuth2Exception> response,
Exception exception)
- Description copied from class:
AbstractOAuth2SecurityExceptionHandler
- Allow subclasses to manipulate the response before it is rendered.
- Overrides:
enhanceResponse in class AbstractOAuth2SecurityExceptionHandler
- Parameters:
response - the response that was generated by the
exception translator.exception - the authentication exception that is being handled
Copyright © 2013. All rights reserved.