summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Auth/OpenID/Message.php7
-rw-r--r--Tests/Auth/OpenID/AuthRequest.php1
2 files changed, 5 insertions, 3 deletions
diff --git a/Auth/OpenID/Message.php b/Auth/OpenID/Message.php
index 8ea429e..95d1103 100644
--- a/Auth/OpenID/Message.php
+++ b/Auth/OpenID/Message.php
@@ -589,6 +589,7 @@ class Auth_OpenID_Message {
// Add namespace definitions to the output
foreach ($this->namespaces->iteritems() as $pair) {
list($ns_uri, $alias) = $pair;
+
if ($alias == Auth_OpenID_NULL_NAMESPACE) {
if ($ns_uri != Auth_OpenID_OPENID1_NS) {
$args['openid.ns'] = $ns_uri;
@@ -602,8 +603,10 @@ class Auth_OpenID_Message {
// could look in the signed list.
}
} else {
- $ns_key = 'openid.ns.' . $alias;
- $args[$ns_key] = $ns_uri;
+ if ($this->getOpenIDNamespace() != Auth_OpenID_OPENID1_NS) {
+ $ns_key = 'openid.ns.' . $alias;
+ $args[$ns_key] = $ns_uri;
+ }
}
}
diff --git a/Tests/Auth/OpenID/AuthRequest.php b/Tests/Auth/OpenID/AuthRequest.php
index 14c4f59..63e4d4e 100644
--- a/Tests/Auth/OpenID/AuthRequest.php
+++ b/Tests/Auth/OpenID/AuthRequest.php
@@ -114,7 +114,6 @@ class TestAuthRequestMixin extends OpenIDTestMixin {
// namespaces. Really it doesn't care that it has alias "0",
// but that is tested anyway
$post_args = $msg->toPostArgs();
- $this->assertEquals('bag:', $post_args['openid.ns.ext0']);
$this->assertEquals('brown', $post_args['openid.ext0.color']);
$this->assertEquals('paper', $post_args['openid.ext0.material']);
}