diff options
-rw-r--r-- | Auth/OpenID.php | 60 | ||||
-rw-r--r-- | Auth/OpenID/Server.php | 2 | ||||
-rw-r--r-- | Auth/OpenID/Util.php | 60 |
3 files changed, 61 insertions, 61 deletions
diff --git a/Auth/OpenID.php b/Auth/OpenID.php index 173ca30..8ed5dd7 100644 --- a/Auth/OpenID.php +++ b/Auth/OpenID.php @@ -23,6 +23,66 @@ require_once "Auth/OpenID/PlainHTTPFetcher.php"; require_once "Auth/OpenID/ParanoidHTTPFetcher.php"; +/** + * Status code returned by the server when the only option is to show + * an error page, since we do not have enough information to redirect + * back to the consumer. The associated value is an error message that + * should be displayed on an HTML error page. + * + * @see Auth_OpenID_Server + */ +define('Auth_OpenID_LOCAL_ERROR', 'local_error'); + +/** + * Status code returned when there is an error to return in key-value + * form to the consumer. The caller should return a 400 Bad Request + * response with content-type text/plain and the value as the body. + * + * @see Auth_OpenID_Server + */ +define('Auth_OpenID_REMOTE_ERROR', 'remote_error'); + +/** + * Status code returned when there is a key-value form OK response to + * the consumer. The value associated with this code is the + * response. The caller should return a 200 OK response with + * content-type text/plain and the value as the body. + * + * @see Auth_OpenID_Server + */ +define('Auth_OpenID_REMOTE_OK', 'remote_ok'); + +/** + * Status code returned when there is a redirect back to the + * consumer. The value is the URL to redirect back to. The caller + * should return a 302 Found redirect with a Location: header + * containing the URL. + * + * @see Auth_OpenID_Server + */ +define('Auth_OpenID_REDIRECT', 'redirect'); + +/** + * Status code returned when the caller needs to authenticate the + * user. The associated value is a Auth_OpenID_ServerRequest + * object that can be used to complete the authentication. If the user + * has taken some authentication action, use the retry() method of the + * Auth_OpenID_ServerRequest object to complete the request. + * + * @see Auth_OpenID_Server + */ +define('Auth_OpenID_DO_AUTH', 'do_auth'); + +/** + * Status code returned when there were no OpenID arguments + * passed. This code indicates that the caller should return a 200 OK + * response and display an HTML page that says that this is an OpenID + * server endpoint. + * + * @see Auth_OpenID_Server + */ +define('Auth_OpenID_DO_ABOUT', 'do_about'); + class Auth_OpenID { /** diff --git a/Auth/OpenID/Server.php b/Auth/OpenID/Server.php index 16edbd5..466f8ab 100644 --- a/Auth/OpenID/Server.php +++ b/Auth/OpenID/Server.php @@ -17,11 +17,11 @@ /** * Required imports */ +require_once "Auth/OpenID.php"; require_once "Auth/OpenID/Association.php"; require_once "Auth/OpenID/CryptUtil.php"; require_once "Auth/OpenID/DiffieHellman.php"; require_once "Auth/OpenID/KVForm.php"; -require_once "Auth/OpenID/Util.php"; require_once "Auth/OpenID/TrustRoot.php"; require_once "Auth/OpenID/ServerRequest.php"; diff --git a/Auth/OpenID/Util.php b/Auth/OpenID/Util.php index 1566cff..67ba691 100644 --- a/Auth/OpenID/Util.php +++ b/Auth/OpenID/Util.php @@ -14,66 +14,6 @@ */ /** - * Status code returned by the server when the only option is to show - * an error page, since we do not have enough information to redirect - * back to the consumer. The associated value is an error message that - * should be displayed on an HTML error page. - * - * @see Auth_OpenID_Server - */ -define('Auth_OpenID_LOCAL_ERROR', 'local_error'); - -/** - * Status code returned when there is an error to return in key-value - * form to the consumer. The caller should return a 400 Bad Request - * response with content-type text/plain and the value as the body. - * - * @see Auth_OpenID_Server - */ -define('Auth_OpenID_REMOTE_ERROR', 'remote_error'); - -/** - * Status code returned when there is a key-value form OK response to - * the consumer. The value associated with this code is the - * response. The caller should return a 200 OK response with - * content-type text/plain and the value as the body. - * - * @see Auth_OpenID_Server - */ -define('Auth_OpenID_REMOTE_OK', 'remote_ok'); - -/** - * Status code returned when there is a redirect back to the - * consumer. The value is the URL to redirect back to. The caller - * should return a 302 Found redirect with a Location: header - * containing the URL. - * - * @see Auth_OpenID_Server - */ -define('Auth_OpenID_REDIRECT', 'redirect'); - -/** - * Status code returned when the caller needs to authenticate the - * user. The associated value is a Auth_OpenID_ServerRequest - * object that can be used to complete the authentication. If the user - * has taken some authentication action, use the retry() method of the - * Auth_OpenID_ServerRequest object to complete the request. - * - * @see Auth_OpenID_Server - */ -define('Auth_OpenID_DO_AUTH', 'do_auth'); - -/** - * Status code returned when there were no OpenID arguments - * passed. This code indicates that the caller should return a 200 OK - * response and display an HTML page that says that this is an OpenID - * server endpoint. - * - * @see Auth_OpenID_Server - */ -define('Auth_OpenID_DO_ABOUT', 'do_about'); - -/** * Some constants for string checking. */ $_Auth_OpenID_letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; |