package me.chyxion.tigon.shiro.model;

import org.apache.shiro.util.ByteSource;
import org.apache.shiro.subject.PrincipalCollection;
import org.apache.shiro.authc.SimpleAuthenticationInfo;

/**
 * @version 0.0.1
 * @since 0.0.1
 * @author Shaun Chyxion <br>
 * chyxion@163.com <br>
 * Apr 8, 2015 1:02:32 PM
 */
public class AuthInfo extends SimpleAuthenticationInfo {
    private static final long serialVersionUID = 1L;
    private Object extra;

    /**
     * @param principal principal
     * @param hashedCredentials hashedCredentials
     * @param credentialsSalt credentialsSalt
     * @param realmName realmName
     */
    public AuthInfo(Object principal, Object hashedCredentials,
            ByteSource credentialsSalt, String realmName) {
        super(principal, hashedCredentials, credentialsSalt, realmName);
    }

    /**
     * @param principal principal
     * @param credentials credentials
     * @param realmName realmName
     */
    public AuthInfo(Object principal, Object credentials, String realmName) {
        super(principal, credentials, realmName);
    }

    /**
     * @param principals principals
     * @param hashedCredentials hashedCredentials
     * @param credentialsSalt credentialsSalt
     */
    public AuthInfo(PrincipalCollection principals, Object hashedCredentials,
            ByteSource credentialsSalt) {
        super(principals, hashedCredentials, credentialsSalt);
    }

    /**
     * @param principals principals
     * @param credentials credentials
     */
    public AuthInfo(PrincipalCollection principals, Object credentials) {
        super(principals, credentials);
    }

    /**
     * @return the extra
     */
    public Object getExtra() {
        return extra;
    }

    /**
     * @param extra the extra to set
     * @return this
     */
    public AuthInfo setExtra(Object extra) {
        this.extra = extra;
        return this;
    }
}
