<?php
/**
 * OpenID Consumer Authentication Request
 *
 * PHP versions 4 and 5
 *
 * LICENSE: See the COPYING file included in this distribution.
 *
 * @package OpenID
 * @author JanRain, Inc. <openid@janrain.com>
 * @copyright 2005 Janrain, Inc.
 * @license http://www.gnu.org/copyleft/lesser.html LGPL
 */


/**
 * This class represents an in-progress OpenID authentication request.
 * It exists to make transferring information between the beginAuth
 * and constructRedirect methods easier.  Users of the OpenID consumer
 * library will need to be aware of the $token value, and may care
 * about the $server_url value.  All other fields are internal
 * information for the library which the user of the library shouldn't
 * need to touch at all.
 *
 * The 'token' is the token generated by the library.  It must be
 * saved until the user's return request, via whatever mechanism works
 * best for this consumer application.
 *
 * The 'server_url' is the URL of the identity server that will be
 * used.  It isn't necessary to do anything with this value, but it is
 * available for consumers that wish to either blacklist or whitelist
 * OpenID servers.
 *
 * @package OpenID
 */
class Auth_OpenID_AuthenticationRequest {
    /**
     * The token that the library uses to track this authentication
     * request. This token is cryptographically signed so that it
     * cannot be forged without the auth secret from the consumer's
     * store.
     */
    var $token;

    /**
     * The identity URL of the user as sent to the server (if there is
     * a delegate, this is the delegate)
     */
    var $server_id;

    /**
     * The base URL of the OpenID server
     */
    var $server_url;

    /**
     * The replay-attack prevention nonce
     */
    var $nonce;

    /**
     * Constructor for use by the consumer
     *
     * @access private
     */
    function Auth_OpenID_AuthenticationRequest(
        $token, $server_id, $server_url, $nonce)
    {
        $this->token = $token;
        $this->server_id = $server_id;
        $this->server_url = $server_url;
        $this->nonce = $nonce;
    }
}

?>