org.rdlinux.ezsecurity.spring.boot.autoconfig.EzSecurityConfigurationAdvice Maven / Gradle / Ivy
package org.rdlinux.ezsecurity.spring.boot.autoconfig;
import org.rdlinux.ezsecurity.ResponseRetConvert;
import org.rdlinux.ezsecurity.shiro.security.client.AuthClient;
import org.rdlinux.ezsecurity.shiro.security.rootfilter.exception.handler.ShiroFilterExceptionHandler;
import org.rdlinux.ezsecurity.shiro.security.rootfilter.exception.handler.impl.DefaultShiroFilterExceptionHandler;
import javax.servlet.Filter;
import java.util.List;
import java.util.Map;
public interface EzSecurityConfigurationAdvice {
/**
* 自定义拦截器, key为拦截器名称
*/
default Map getFilters() {
return null;
}
/**
* 自定义支持的client
*
* @param clients 已存在的client
* @return 返回所有支持的client
*/
default List getClients(final List clients) {
return clients;
}
/**
* 自定义shiro拦截器异常处理
*/
default ShiroFilterExceptionHandler getShiroFilterExceptionHandler() {
return new DefaultShiroFilterExceptionHandler();
}
/**
* 获取未认证错误信息
*/
default String getUnAuthenticatedMsg() {
return "未认证";
}
/**
* 获取未认证错误信息
*/
default String getUnAuthorizedMsg() {
return "未授权";
}
/**
* 获取异常反回结果转换器
*/
default ResponseRetConvert getResponseRetConvert() {
return new ResponseRetConvert() {
};
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy