Alan
2021-02-17 41f5434217c77cb0fd87b08008876f7a5be5af55
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
package cc.mrbird.febs.common.security.starter.properties;
 
import cc.mrbird.febs.common.core.entity.constant.EndpointConstant;
import org.springframework.boot.context.properties.ConfigurationProperties;
 
/**
 * @author MrBird
 */
@ConfigurationProperties(prefix = "febs.cloud.security")
public class FebsCloudSecurityProperties {
 
    /**
     * 是否开启安全配置
     */
    private Boolean enable;
    /**
     * 配置需要认证的uri,默认为所有/**
     */
    private String authUri = EndpointConstant.ALL;
    /**
     * 免认证资源路径,支持通配符
     * 多个值时使用逗号分隔
     */
    private String anonUris;
    /**
     * 是否只能通过网关获取资源
     */
    private Boolean onlyFetchByGateway = Boolean.TRUE;
 
    public Boolean getEnable() {
        return enable;
    }
 
    public void setEnable(Boolean enable) {
        this.enable = enable;
    }
 
    public String getAuthUri() {
        return authUri;
    }
 
    public void setAuthUri(String authUri) {
        this.authUri = authUri;
    }
 
    public String getAnonUris() {
        return anonUris;
    }
 
    public void setAnonUris(String anonUris) {
        this.anonUris = anonUris;
    }
 
    public Boolean getOnlyFetchByGateway() {
        return onlyFetchByGateway;
    }
 
    public void setOnlyFetchByGateway(Boolean onlyFetchByGateway) {
        this.onlyFetchByGateway = onlyFetchByGateway;
    }
 
    @Override
    public String toString() {
        return "FebsCloudSecurityProperties{" +
                "enable=" + enable +
                ", authUri='" + authUri + '\'' +
                ", anonUris='" + anonUris + '\'' +
                ", onlyFetchByGateway=" + onlyFetchByGateway +
                '}';
    }
}