package com.steerinfo.auth.shiro.token;

import java.util.Map;

import org.apache.shiro.authc.AuthenticationToken;

/**
 * 
 * @Title: StatelessToken.java
 * @Package com.steer.framework.auth.shiro.token
 * @Description: TODO
 * @author 鄢利
 * @date 2018年7月16日
 * @Copyright © 2018湖南视拓信息技术股份有限公司. All rights reserved.
 */
public class StatelessToken implements AuthenticationToken {

    private String jwt;
    private Map<String, ?> params;

    public StatelessToken(String jwt, Map<String, ?> params){
        this.jwt = jwt;
        this.params = params;
    }

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

    @Override
    public Object getCredentials() {
        return jwt;
    }

    public Map<String, ?> getParams() {
        return params;
    }

    public void setParams(Map<String, ?> params) {
        this.params = params;
    }

    public String getJwt() {
        return jwt;
    }

    public void setJwt(String jwt) {
        this.jwt = jwt;
    }
}
