public final class BearerTokenAuthenticationEntryPoint
extends java.lang.Object
implements org.springframework.security.web.AuthenticationEntryPoint
AuthenticationEntryPoint implementation used to commence authentication of
protected resource requests using BearerTokenAuthenticationFilter.
Uses information provided by BearerTokenError to set HTTP response status code
and populate WWW-Authenticate HTTP header.
BearerTokenError,
RFC 6750
Section 3: The WWW-Authenticate Response Header Field| Constructor and Description |
|---|
BearerTokenAuthenticationEntryPoint() |
| Modifier and Type | Method and Description |
|---|---|
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, specifically
error, error_description, error_uri, and
scope. |
void |
setRealmName(java.lang.String realmName)
Set the default realm name to use in the bearer token error response
|
public void commence(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.security.core.AuthenticationException authException)
error, error_description, error_uri, and
scope.commence in interface org.springframework.security.web.AuthenticationEntryPointrequest - that resulted in an AuthenticationExceptionresponse - so that the user agent can begin authenticationauthException - that caused the invocationpublic void setRealmName(java.lang.String realmName)
realmName -