takcy / openid4java

Automatically exported from code.google.com/p/openid4java
Apache License 2.0
0 stars 0 forks source link

openid.ns backward compatibility issue #65

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Users have complained of not being able use openid4java to parse
authentication requests from Drupal. These requests set the message
parameter openid.ns=http://openid.net/signon/1.0.

Looking at the trunk source code, it appears we do the following in
org.openid4java.message.AuthRequest.validate() [line 233]:

if ( compatibility && hasParameter("openid.ns") )
{
  throw new MessageException(
    "Invalid value for openid.ns field: "
    + getParameterValue("openid.ns"),
    OpenIDException.AUTH_ERROR);
}

The OpenID 2.0 specs
(http://openid.net/specs/openid-authentication-2_0.html#anchor4) state this
with regards to the openid.ns parameter:

If this value is absent or set to one of "http://openid.net/signon/1.1" or
"http://openid.net/signon/1.0", then this message SHOULD be interpreted
using OpenID Authentication 1.1 Compatibility mode (OpenID Authentication
1.1 Compatibility). 

I propose removing the "if" block described above so that we meet the
OpenID spec. I will commit the change to trunk if someone gives the thumbs up.

Original issue reported on code.google.com by shi...@gmail.com on 23 Jul 2008 at 12:23

GoogleCodeExporter commented 8 years ago
This looks like an overlook in the current implementation -- please commit the 
patch 
and thanks!

Original comment by Johnny.B...@gmail.com on 23 Jul 2008 at 8:02

GoogleCodeExporter commented 8 years ago
Committed to trunk.

Original comment by shi...@gmail.com on 24 Jul 2008 at 4:20