takcy / openid4java

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

PapeRequest does not set assurance levels namespaces #126

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a PapeRequest object.
2. Attempt to call addPreferredCustomAuthLevel() specifying the nist assurance 
level as the parameter.
3. View the generated PapeRequest output.

What is the expected output? What do you see instead?
I expect to see this in the message:
openid.ns.ext1=http://specs.openid.net/extensions/pape/1.0
openid.ext1.auth_level.ns.papeauthlevel1=http://csrc.nist.gov/publications/nistp
ubs/800-63/SP800-63V1_0_2.pdf
openid.ext1.preferred_auth_levels=papeauthlevel1

What I see is:
openid.ns.ext1=http://specs.openid.net/extensions/pape/1.0
openid.ext1.preferred_auth_levels=papeauthlevel1

The papeauthlevel1 type definition is missing.

What version of the product are you using? On what operating system?
0.9.5.593
CentOS 5.4

Please provide any additional information below.

I've added this line to the end of the addPreferredCustomAuthLevel(String 
authLevelTypeUri) method in PapeRequest.java.  The auth level definition is now 
showing up properly in the Pape request.

_parameters.set(new Parameter(AUTH_LEVEL_NS_PREFIX + alias, authLevelTypeUri));

Original issue reported on code.google.com by mike.mal...@gmail.com on 16 Aug 2010 at 1:08

GoogleCodeExporter commented 8 years ago
I made a mistake in the above expected output section.

It should be "openid.ext1.preferred_auth_level_types" instead of 
"openid.ext1.preferred_auth_levels".

Original comment by mike.mal...@gmail.com on 23 Aug 2010 at 2:34

GoogleCodeExporter commented 8 years ago
I am seeing the same issue.

Original comment by iandug...@gmail.com on 23 Sep 2010 at 12:15

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I ended up working around this by generating the PapeRequest auth_levels 
manually and passing them in when the object is created.

Simple example:

ParameterList params = new ParameterList();
params.set(new Parameter("preferred_auth_policies", "")); // required
params.set(new Parameter("auth_level.ns.nist", 
"http://csrc.nist.gov/publications/nistpubs/800-63/SP800-63V1_0_2.pdf"));
params.set(new Parameter("preferred_auth_level_types", "nist"));
PapeRequest papeReq = PapeRequest.createPapeRequest(params);

Original comment by mike.mal...@gmail.com on 23 Sep 2010 at 12:57

GoogleCodeExporter commented 8 years ago
Fixed in r695.

Original comment by Johnny.B...@gmail.com on 1 Nov 2012 at 2:09