(improvement)(auth) 增强UserStrategy的可配置性 (#1949)

This commit is contained in:
mislayming
2024-12-10 19:09:22 +08:00
committed by GitHub
parent 3db9a0dcec
commit a298c670ed
5 changed files with 38 additions and 3 deletions

View File

@@ -18,6 +18,9 @@ public class AuthenticationConfig {
@Value("${s2.authentication.include.path:/api}")
private String includePath;
@Value("${s2.authentication.strategy:http}")
private String strategy;
@Value("${s2.authentication.enable:false}")
private boolean enabled;

View File

@@ -7,6 +7,8 @@ import com.tencent.supersonic.common.pojo.User;
public interface UserStrategy {
String getStrategyName();
boolean accept(boolean isEnableAuthentication);
User findUser(HttpServletRequest request, HttpServletResponse response);