package com.dcit.authority.shiro.token;

import org.apache.shiro.authc.AuthenticationToken;


/**
* <p>Title: JwtToken</p>
* <p>Description: </p>
* <p>Company: SJZ DC-IT co. LTD</p> 
* @author ZZZ
* @date 2018年9月6日 下午6:01:31
*/
public class JwtToken implements AuthenticationToken {
	
	private static final long serialVersionUID = 1L;

    /**
     * 用户的标识
     */
    private String account;
    /**
     * 用户的IP
     */
    private String ipHost;
    /**
     * 设备信息
     */
    private String deviceInfo;
    /**
     * json web token值
     */
    private String jwt;
    
    
	public JwtToken(String account, String ipHost, String deviceInfo, String jwt) {
		super();
		this.account = account;
		this.ipHost = ipHost;
		this.deviceInfo = deviceInfo;
		this.jwt = jwt;
	}
	
	public String getAccount() {
		return account;
	}
	public void setAccount(String account) {
		this.account = account;
	}
	public String getIpHost() {
		return ipHost;
	}
	public void setIpHost(String ipHost) {
		this.ipHost = ipHost;
	}
	public String getDeviceInfo() {
		return deviceInfo;
	}
	public void setDeviceInfo(String deviceInfo) {
		this.deviceInfo = deviceInfo;
	}
	public String getJwt() {
		return jwt;
	}
	public void setJwt(String jwt) {
		this.jwt = jwt;
	}

	@Override
	public Object getPrincipal() {
		// TODO Auto-generated method stub
		return this.account;
	}

	@Override
	public Object getCredentials() {
		// TODO Auto-generated method stub
		return this.jwt;
	}
    
    

    
}
