package com.iformall.shiro;

import com.iformall.enums.EnumLoginType;
import org.apache.shiro.authc.UsernamePasswordToken;

public class UseriFormallToken extends UsernamePasswordToken {
    private static final long serialVersionUID = -2564928913725078138L;

    private EnumLoginType type;

    public UseriFormallToken() {
        super();
    }

    public UseriFormallToken(String username, String password, EnumLoginType type, boolean rememberMe, String host) {
        super(username, password, rememberMe,  host);
        this.type = type;
    }

    /** 免密登录 */
    public UseriFormallToken(String username) {
        super(username, "", false, null);
        this.type = EnumLoginType.NOPASSWD;
    }
    /** 账号密码登录 */
    public UseriFormallToken(String username, String pwd) {
        super(username, pwd, false, null);
        this.type = EnumLoginType.PASSWORD;
    }

    public EnumLoginType getType() {
        return type;
    }


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