k94314517
2025-05-19 cdd6551b190b981b807a3b95e9635c559ccc769d
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
package com.doumee.config.shiro;
 
import org.apache.shiro.authc.UsernamePasswordToken;
 
/**
 * 自定义Token ,处理认证和权限
 * @author Eva.Caesar Liu
 * @date 2022/04/18 18:12
 */
//@Component
public class ShiroToken extends UsernamePasswordToken {
 
    /**
     * 公司ID
     */
    boolean needPassword;
    int userType;
    Integer companyId;
 
    public ShiroToken() {
    }
    public  ShiroToken( String username, String password, boolean needPassword,int userType,Integer companyId) {
        super(username,  password, false, (String)null);
        this.needPassword = needPassword;
        this.userType = userType;
        this.companyId = companyId;
    }
    public Integer getCompanyId() {
        return companyId;
    }
 
    public void setCompanyId(Integer companyId) {
        this.companyId = companyId;
    }
 
 
    public boolean isNeedPassword() {
        return needPassword;
    }
 
    public void setNeedPassword(boolean needPassword) {
        this.needPassword = needPassword;
    }
 
    public int getUserType() {
        return userType;
    }
 
    public void setUserType(int userType) {
        this.userType = userType;
    }
}