package com.goafanti.core.shiro.token;

import java.io.Serializable;

import org.apache.shiro.authc.UsernamePasswordToken;

public class ShiroToken extends UsernamePasswordToken implements Serializable {

	private static final long serialVersionUID = 4364371216579943671L;

	public ShiroToken(String username, String pwd, Integer type,Integer source) {
		super(username, pwd);
		this.pwd = pwd;
		this.type = type;
		this.source = source;
	}

	public ShiroToken(String username, String pwd) {
		super(username, pwd);
		this.pwd = pwd;
	}

	/** 登录密码[字符串类型] 因为父类是char[] ] **/
	private String	pwd;

	private Integer	type;

	private String	id;

	private Integer source;
	
	public String getPwd() {
		return pwd;
	}

	public void setPwd(String pwd) {
		this.pwd = pwd;
	}

	public Integer getType() {
		return type;
	}

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

	public Integer getSource() {
		return source;
	}

	public void setSource(Integer source) {
		this.source = source;
	}

	@Override
	public Object getPrincipal() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
}
