Verification is performed transparently by the ConsumerManager
regardless of the stateless mode; there's nothing extra to configure for
it.
Stateless mode can be disabled with
ConsumerManager.setAllowStateless(false).
Stateless mode can be required with
ConsumerManager.setMaxAssocAttempts(0).
Johnny
If there's no previously discovered info, null should be used.
> org.openid4java.discovery.DiscoveryException: 0x500: Cannot parse
> identifier: null
> at org.openid4java.discovery.Discovery.parseIdentifier(Discovery.java:
> 106)
> at org.openid4java.discovery.Discovery.discover(Discovery.java:114)
> at org.openid4java.consumer.ConsumerManager.discover
> (ConsumerManager.java:527)
It looks like you're passing a null identifier to discover(), the
failure is expected in this case.
> I'm just wondering if it's possible to perform openid without keeping
> any state on the server ?
If by server you mean RP / Consumer, than yes it is possible.
Johnny
To make sure we're on the same page, "stateless" in OpenID context means
no associations maintained by the RP (the OP will do the signature
verification).
For cluster deployments that do not guarantee that clients are
redirected back to the same RP hosts, there are two options:
1. Stateless mode can be enforced, via ConsumerManager.setMaxAssocAttempts(0)
Note that this option comes with two drawbacks:
- verification will be slower, since an extra call to the OP is required
for each message
- won't work for OpenID 1.x messages, where the ConsumerManager enforces
the use of (in-memory) RP nonces (for security reasons)
2. The RP can be configured to use database-backed stores for the
associations and RP nonces (the JdbcConsumerAssociationStore and
JdbcNonceVerifier).
> or explanations of how to
> read the OpenID information from an HTTP request headers that comes in to my
> web service.
OpenID does not use HTTP headers for the OpenID specific payload of the
messages. See sections 4 and 5 (Data Formats and Communication Types) of
the specification.
Johnny