----- Original Message -----
From: "Noel J. Bergman" <[EMAIL PROTECTED]>
regd. AuthState.
> AuthI'm looking at it now ... I don't see where it does what you say it
does.  I
> see two setters and the isAuthenticated() method:

Noel I have not been ready with this yet, but if are keen I'll post. Would
prefer to have deferred this discussion...

Here it is:

/**
 * Provides Authentication Credentials.
 *
 * Helps manage the Protocol Authentication state, resets
 * authenticated flag as need be.
 *
 * Helps avoid unnecessary re authentication.
 *
 */
public class AuthState
{
    private String userID;
    private String password;
    private boolean authenticated;

    // ---- methods invoked by authentication service -----
    /**
     * @return value of authenticated flag.
     */
    public boolean isAuthenticated() {
        return authenticated;
    }

    /**
     * Get the value of userID.
     * @return value of userID.
     */
    public String getUserID() {
        return userID;
    }

    /**
     * Get the value of password.
     * @return value of password.
     */
    public String getPassword() {
        return password;
    }

    /**
     * @param v  Value to assign to indicate authentication done or not.
     */
    void setAuthenticated(boolean  v) {
        this.authenticated = v;
    }

    /**
     * Set the value of userID. reset authentication state
     * @param v  Value to assign to userID.
     */
    void setUserID(String  v) {
        reset();
        this.userID = v;
    }

    /**
     * Set the value of password. reset authentication flag
     * @param v  Value to assign to password.
     */
    void setPassword(String  v) {
        this.authenticated = false;
        this.password = v;
    }

    /** reset to initial state */
    void reset() {
        userID = password = null;
        authenticated = false;
    }
}


--
To unsubscribe, e-mail:   <mailto:james-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:james-dev-help@;jakarta.apache.org>

Reply via email to