package cn.estsh.i3plus.pojo.base.shirotoken;

import org.apache.shiro.authc.AuthenticationToken;

/**
 * @Description : 基本验证类
 * @Reference :
 * @Author : alwaysfrin
 * @CreateDate : 2018-10-13 18:00
 * @Modify:
 **/
public class BaseToken implements AuthenticationToken {

    private String loginName;
    private String loginPwd;
    private String languageCode;
    private Integer loginPlatform;

    public BaseToken(String loginName, String loginPwd, String languageCode) {
        this.loginName = loginName;
        this.loginPwd = loginPwd;
        this.languageCode = languageCode;
    }

    public BaseToken(String loginName, String loginPwd, String languageCode,Integer loginPlatform) {
        this.loginName = loginName;
        this.loginPwd = loginPwd;
        this.languageCode = languageCode;
        this.loginPlatform = loginPlatform;
    }

    //身份
    @Override
    public Object getPrincipal() {
        return this.loginName;
    }

    //验证
    @Override
    public Object getCredentials() {
        return this.loginPwd;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getLoginPwd() {
        return loginPwd;
    }

    public void setLoginPwd(String loginPwd) {
        this.loginPwd = loginPwd;
    }

    public String getLanguageCode() {
        return languageCode;
    }

    public void setLanguageCode(String languageCode) {
        this.languageCode = languageCode;
    }

    public Integer getLoginPlatform() {
        return loginPlatform;
    }

    public void setLoginPlatform(Integer loginPlatform) {
        this.loginPlatform = loginPlatform;
    }
}
