What can cause the direct verification step of the OpenID process to fail?
===

This is similar to the question http://stackoverflow.com/questions/5545999/last-step-of-openid-verification-always-returned-is-validfalse, however that problem appeared to be specific to using Google Apps as an OpenID provider and not applicable in my case.

**General Question:**

I'm getting an "is_valid: false" response during the direct verification step, and my general question is what conditions can cause this to happen? There is no specific information on the direct verification response to indicate why it's failing (as dictated by the OpenID 2.0 specification), making it hard to troubleshoot.

**Specific details:**

In terms of my specific implementation and problem, it's interesting in that I'm handling the beginning of the OpenID process (generating the redirect URL to go to the OpenID provider) in a separate front-end Rails application, and then trying to do the verification step on a back-end Scala app. Since these steps happen in separate apps, I can't use an association handle and need to rely on direct verification.

I'm seeing the initial steps in the verification process succeed - verifying the return_to, discovered and nonce, but the direct verification response has is_valid: false.

Here's a gist with the relevant Scala code and corresponding logs: https://gist.github.com/3146085. This is using OpenID4Java 0.9.6.

If I use the sample app from http://sureshatt.blogspot.com/2011/05/openid-dumb-mode-consumer-with.html direct verification works, and I've verified that the same set of parameters are being sent on the verification call with that app and mine (albeit with different values).