package com.emr.controller;

import com.emr.entity.Power_User;
import org.apache.shiro.authc.UsernamePasswordToken;

/**
 * @ProjectName:
 * @Description:
 * @Param 传输参数
 * @Return
 * @Author: 曾文和
 * @CreateDate: 2019/9/5 13:14
 * @UpdateUser: 曾文和
 * @UpdateDate: 2019/9/5 13:14
 * @UpdateRemark: 更新说明
 * @Version: 1.0
 */
public class UserToken extends UsernamePasswordToken {
    private Power_User user;

    private String username;
    public UserToken(String username, Power_User user) {
        this.username = username;
        this.user = user;
    }
    public Object getCredentials() {
        return "123456";
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }


    public Power_User getUser() {
        return user;
    }

    public void setUser(Power_User user) {
        this.user = user;
    }

    public Object getPrincipal() {
        return this.getUser();
    }

}
