openid_identifier という名前は扱いにくいよ

 OpenID をなんぼか簡単に扱うライブラリを作成した(そして地味にバージョンアップさせている)わけですが、サンプルの Cubby のアクションクラスに openid_identifier という気持ち悪い名前のフィールドがあったのにお気づきでしょうか?

 普通の(Sun の)コーディング規約なら openidIdentifier とでもなりそうなものですが、なぜこんな名前にしているかといいますと、OpenID の仕様で、

The form field's "name" attribute SHOULD have the value "openid_identifier", so that User-Agents can automatically determine that this is an OpenID form. Browser extensions or other software that support OpenID Authentication may not detect a Relying Party's support if this attribute is not set appropriately.

そのフォームフィールドの"name"属性は、User-Agentは自動的にこれがOpenIDフォームであると判断する事が出来る様に、"openid_identifier"という値であるべきです。ブラウザの拡張やOpenID認証をサポートする他のソフトウェアは、この属性が適切にセットされていないなら、RPのサポートを見つけられないかもしれません。

となっているからです。


 でも、気持ち悪いよ openid_identifier って名前は。CheckStyle とかでも引っかかるし(これのためだけにルールを書くのもそれはそれでキモいし)。Cubby の場合は RequestParser を自分で書かないと対処しようがないのかしら? RequestParameter アノテーションあたりで指定できたら良いのにな。

    @RequestParameter("openid_identifier")
    public String openidIdentifier;

 ↑こんな感じで。