Class BearerTokenAuthenticationEntryPoint
- java.lang.Object
-
- org.springframework.security.oauth2.server.resource.web.BearerTokenAuthenticationEntryPoint
-
- All Implemented Interfaces:
org.springframework.security.web.AuthenticationEntryPoint
public final class BearerTokenAuthenticationEntryPoint extends java.lang.Object implements org.springframework.security.web.AuthenticationEntryPointAnAuthenticationEntryPointimplementation used to commence authentication of protected resource requests usingBearerTokenAuthenticationFilter.Uses information provided by
BearerTokenErrorto set HTTP response status code and populateWWW-AuthenticateHTTP header.- Since:
- 5.1
- See Also:
BearerTokenError, RFC 6750 Section 3: The WWW-Authenticate Response Header Field
-
-
Constructor Summary
Constructors Constructor Description BearerTokenAuthenticationEntryPoint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcommence(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException authException)Collect error details from the provided parameters and format according to RFC 6750, specificallyerror,error_description,error_uri, andscope.voidsetRealmName(java.lang.String realmName)Set the default realm name to use in the bearer token error response
-
-
-
Method Detail
-
commence
public void commence(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException authException)Collect error details from the provided parameters and format according to RFC 6750, specificallyerror,error_description,error_uri, andscope.- Specified by:
commencein interfaceorg.springframework.security.web.AuthenticationEntryPoint- Parameters:
request- that resulted in anAuthenticationExceptionresponse- so that the user agent can begin authenticationauthException- that caused the invocation
-
setRealmName
public void setRealmName(java.lang.String realmName)
Set the default realm name to use in the bearer token error response- Parameters:
realmName-
-
-