import com.jivesoftware.base.AuthToken;
import java.io.Serializable;

/**
 * Implementation of the AuthToken interface.
 */
public final class CustomAuthToken implements AuthToken, Serializable {

    private long userID;

    /**
     * Constucts a new auth token with the specified userID.
     *
     * @param userID the userID to create an authToken token with.
     */
    protected CustomAuthToken(long userID) {
        this.userID = userID;
    }

    // AuthToken Interface

    public long getUserID() {
        return userID;
    }

    public boolean isAnonymous() {
        return userID == -1;
    }
}