接口 BasicConfig
public interface BasicConfig
基本设置类接口
- 从以下版本开始:
- 1.9
- 作者:
- XUMUMI
-
方法概要
修饰符和类型 方法 说明 ResultCallback<org.springframework.security.core.AuthenticationException>getFailureCallback()获取登录失败回调函数GuardCallbackgetGuardCallback()获取登录守卫回调函数StringgetLoginProcessingUrl()获取登录页StringgetPasswordParameter()获取密码字段StringgetRoleParameter()获取角色字段ResultCallback<org.springframework.security.core.Authentication>getSuccessCallback()获取登录成功回调函数StringgetUsernameParameter()获取用户名字段voidsetFailureCallback(ResultCallback<org.springframework.security.core.AuthenticationException> callback)自定义登录失败回调函数voidsetGuardCallback(GuardCallback callback)自定义登录守卫回调函数voidsetLoginProcessingUrl(String url)自定义登录页voidsetPasswordParameter(String parameter)自定义密码字段voidsetRoleParameter(String parameter)自定义角色字段voidsetSuccessCallback(ResultCallback<org.springframework.security.core.Authentication> callback)自定义登录成功回调函数voidsetUsernameParameter(String parameter)自定义用户名字段
-
方法详细资料
-
setLoginProcessingUrl
自定义登录页- 参数:
url- 登录页地址
-
getLoginProcessingUrl
String getLoginProcessingUrl()获取登录页- 返回:
- 登录页地址
-
setUsernameParameter
自定义用户名字段- 参数:
parameter- 用户名的字段名- 另请参阅:
AbstractJsonAuthenticationFilter.setUsernameParameter(String)
-
setPasswordParameter
自定义密码字段- 参数:
parameter- 密码的字段名- 另请参阅:
AbstractJsonAuthenticationFilter.setPasswordParameter(String)
-
setRoleParameter
自定义角色字段- 参数:
parameter- 角色字段名- 另请参阅:
JwtAuthenticationFilterImpl.setRoleParameter(String)
-
getUsernameParameter
String getUsernameParameter()获取用户名字段 -
getPasswordParameter
String getPasswordParameter()获取密码字段 -
getRoleParameter
String getRoleParameter()获取角色字段- 返回:
- 字段名
- 另请参阅:
JwtAuthenticationFilterImpl.setRoleParameter(String)
-
setSuccessCallback
自定义登录成功回调函数- 参数:
callback- 处理Authentication并返回一个可序列化对象的回调函数 该回调函数原型如下 Object callback(String path, Authentication authResult) 传入的是调用页面地址和认证信息,返回一个可序列化的对象- 另请参阅:
AbstractJsonAuthenticationFilter.setSuccessCallback(ResultCallback)
-
setFailureCallback
void setFailureCallback(ResultCallback<org.springframework.security.core.AuthenticationException> callback)自定义登录失败回调函数- 参数:
callback- 处理AuthenticationException并返回一个可序列化对象的回调函数 该回调函数原型如下 Object callback(String path, AuthenticationException exception) 传入的是调用页面地址和错误细节,返回一个可序列化对象- 另请参阅:
AbstractJsonAuthenticationFilter.setFailureCallback(ResultCallback)
-
setGuardCallback
自定义登录守卫回调函数- 参数:
callback- 处理 用户标志及Authentication,自行抛出异常 该回调函数原型如下 Object callback(Authentication authResult) 传入的是认证信息,如需拦截则向上抛出异常- 另请参阅:
AbstractJsonAuthenticationFilter.setGuardCallback(GuardCallback)
-
getSuccessCallback
ResultCallback<org.springframework.security.core.Authentication> getSuccessCallback()获取登录成功回调函数 -
getFailureCallback
ResultCallback<org.springframework.security.core.AuthenticationException> getFailureCallback()获取登录失败回调函数 -
getGuardCallback
GuardCallback getGuardCallback()获取登录守卫回调函数- 返回:
- 回调函数
-