jiaosong
2023-09-08 cbf7bd4c7d62670b26292d4738cc062bf965591c
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
package com.doumee.shiro;
 
import org.apache.shiro.authc.UsernamePasswordToken;
import org.springframework.stereotype.Component;
 
/**
 * 自定义Token ,处理认证和权限
 * @author Eva.Caesar Liu
 * @date 2022/04/18 18:12
 */
//@Component
public class ShiroToken extends UsernamePasswordToken {
 
    /**
     * 公司ID
     */
    Integer companyId;
    Boolean isDdLogin;
    Boolean isWxLogin;
 
    public ShiroToken() {
    }
    public ShiroToken(Integer companyId, String username, String password, boolean isDdLogin, boolean isWxLogin) {
        super(username,  password, false, (String)null);
        this.companyId = companyId;
        this.isDdLogin = isDdLogin;
        this.isWxLogin = isWxLogin;
    }
 
    public Boolean getDdLogin() {
        return isDdLogin;
    }
 
    public void setDdLogin(Boolean ddLogin) {
        isDdLogin = ddLogin;
    }
 
 
    public Boolean getWxLogin() {
        return isWxLogin;
    }
 
    public void setWxLogin(Boolean wxLogin) {
        isWxLogin = wxLogin;
    }
 
    public Integer getCompanyId() {
        return companyId;
    }
 
    public void setCompanyId(Integer companyId) {
        this.companyId = companyId;
    }
}