com.iteaj.izone.web.shiro.ShiroAuthToken Maven / Gradle / Ivy
package com.iteaj.izone.web.shiro;
import com.iteaj.izone.spi.AuthToken;
import org.apache.shiro.authc.UsernamePasswordToken;
/**
* create time: 2020/3/29
*
* @author iteaj
* @since 1.0
*/
public class ShiroAuthToken extends UsernamePasswordToken implements AuthToken {
private String captcha;
public String getCaptcha() {
return captcha;
}
public ShiroAuthToken setCaptcha(String captcha) {
this.captcha = captcha;
return this;
}
@Override
public String getPrincipal() {
return this.getUsername();
}
@Override
public char[] getCredentials() {
return (char[]) super.getCredentials();
}
}