summaryrefslogtreecommitdiffstats
path: root/Auth
diff options
context:
space:
mode:
authortailor <dag@janrain.com>2008-05-29 23:10:28 +0000
committertailor <dag@janrain.com>2008-05-29 23:10:28 +0000
commite216ac8552df44b3281cfd75e9c2dffb776cfc32 (patch)
tree2f5652ff2f59998433a2c5a3456f8b864f226dd1 /Auth
parent3db1da32330040bcd337bbe1960cf3527857c394 (diff)
downloadphp-openid-e216ac8552df44b3281cfd75e9c2dffb776cfc32.zip
php-openid-e216ac8552df44b3281cfd75e9c2dffb776cfc32.tar.gz
php-openid-e216ac8552df44b3281cfd75e9c2dffb776cfc32.tar.bz2
[project @ PAPE: properly use "none" for empty auth policies list]
Diffstat (limited to 'Auth')
-rw-r--r--Auth/OpenID/PAPE.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/Auth/OpenID/PAPE.php b/Auth/OpenID/PAPE.php
index 6b2e3f4..b9f68c8 100644
--- a/Auth/OpenID/PAPE.php
+++ b/Auth/OpenID/PAPE.php
@@ -237,7 +237,7 @@ class Auth_OpenID_PAPE_Response extends Auth_OpenID_Extension {
function parseExtensionArgs($args, $strict=false)
{
$policies_str = Auth_OpenID::arrayGet($args, 'auth_policies');
- if ($policies_str) {
+ if ($policies_str and $policies_str != "none") {
$this->auth_policies = explode(" ", $policies_str);
}
@@ -272,10 +272,12 @@ class Auth_OpenID_PAPE_Response extends Auth_OpenID_Extension {
function getExtensionArgs()
{
- $ns_args = array(
- 'auth_policies' =>
- implode(' ', $this->auth_policies)
- );
+ $ns_args = array();
+ if (count($this->auth_policies) > 0) {
+ $ns_args['auth_policies'] = implode(' ', $this->auth_policies);
+ } else {
+ $ns_args['auth_policies'] = 'none';
+ }
if ($this->nist_auth_level !== null) {
if (!in_array($this->nist_auth_level, range(0, 4), true)) {