类 JsonAuthenticationEntryPoint
java.lang.Object
cn.bbwres.biscuit.security.oauth2.web.JsonAuthenticationEntryPoint
- 所有已实现的接口:
org.springframework.security.web.AuthenticationEntryPoint
public class JsonAuthenticationEntryPoint
extends Object
implements org.springframework.security.web.AuthenticationEntryPoint
认证失败时返回json数据
- 作者:
- zhanglinfeng
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidcommence(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException authException) Commences an authentication scheme.
-
构造器详细资料
-
JsonAuthenticationEntryPoint
public JsonAuthenticationEntryPoint()
-
-
方法详细资料
-
commence
public void commence(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException authException) throws IOException, jakarta.servlet.ServletException Commences an authentication scheme.ExceptionTranslationFilterwill populate theHttpSessionattribute namedAbstractAuthenticationProcessingFilter.SPRING_SECURITY_SAVED_REQUEST_KEYwith the requested target URL before calling this method.Implementations should modify the headers on the
ServletResponseas necessary to commence the authentication process.- 指定者:
commence在接口中org.springframework.security.web.AuthenticationEntryPoint- 参数:
request- that resulted in anAuthenticationExceptionresponse- so that the user agent can begin authenticationauthException- that caused the invocation- 抛出:
IOExceptionjakarta.servlet.ServletException
-