package com.nuliji.tools.shiro.inter.impl;

import com.nuliji.tools.shiro.inter.RealmAuthenticationToken;
import org.apache.shiro.authc.UsernamePasswordToken;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Created by GaoJie on 2017/11/3.
 * 带Realm的登录
 */
public class RealmUsernamePasswordToken extends UsernamePasswordToken implements RealmAuthenticationToken {

    private static final Logger logger = LoggerFactory.getLogger(RealmUsernamePasswordToken.class);
    protected Class realmCls;
    @Override
    public Class getRealm() {
        return realmCls;
    }

    public RealmUsernamePasswordToken(String username, String password, Class realmCls){
        super(username, password);
        this.realmCls = realmCls;
    }

    public RealmUsernamePasswordToken(String username, String password, Boolean remember, Class realmCls){
        super(username, password, remember);
        this.realmCls = realmCls;
    }
}
