package com.ruoyi.framework.shiro;

import com.ruoyi.common.enums.LoginType;
import org.apache.shiro.authc.UsernamePasswordToken;

/**
 * 用户登录token
 * @description：
 * @date ：Created in 2022/8/8 12:56
 * @modified By：
 * @version: $
 */
public class UserToken extends UsernamePasswordToken {
    private static final long serialVersionUID = 1L;

    private LoginType type;

    public UserToken()
    {
    }

    public UserToken(String username, String password, LoginType type, boolean rememberMe)
    {
        super(username, password, rememberMe);
        this.type = type;
    }

    public UserToken(String username, LoginType type)
    {
        super(username, "", false, null);
        this.type = type;
    }

    public UserToken(String username, String password, LoginType type)
    {
        super(username, password, false, null);
        this.type = type;
    }

    public LoginType getType()
    {
        return type;
    }

    public void setType(LoginType type)
    {
        this.type = type;
    }
}
