0

Attribute exchange not working ?

I am working on a project which requires openId authentication.... I have integrated it for google. I am using Spring Security's openId support to achieve this and successfully integrated the google support. Now same code is not working for Yahoo. My Spring-Security.xml has following lines of code :-

<security:attribute-exchange>
                <security:openid-attribute name="axContactEmail" type="http://axschema.org/contact/email" required="true"/>
                <security:openid-attribute name="oiContactEmail" type="http://schema.openid.net/contact/email" required="true"/>
                <security:openid-attribute name="axNamePersonFullname" type="http://axschema.org/namePerson" required="true"/>
                <security:openid-attribute name="axNamePersonFriendlyName" type="http://axschema.org/namePerson/friendly" required="true"/>
                <security:openid-attribute name="axNamePersonFirstName" type="http://axschema.org/namePerson/first" required="true"/>
                <security:openid-attribute name="axNamePersonLastName" type="http://axschema.org/namePerson/last" required="true"/>
</security:attribute-exchange>

and somewhere in my code I print the attributes in console...much to my surprise I get following output :-

Email Address  : null
Full name  : null null
Prefered login  : null.null
Identifier here  : https://me.yahoo.com/a/(some random combination number) [correct!! Yes I have verified it]

the same code works perfectly fine for google and displays correct and relevent information....Any clue plz ?


Thanks in advance,

by
1 Reply
  • This question is old, but hope to help others.

    We must use email attribute name instead axContactEmail or oiContactEmail

    My config works with both Google and Yahoo! :

    <security:attribute-exchange>
        <<security:openid-attribute> name="email" type="<http://schema.openid.net/contact/email>" required="true"/>
        <<security:openid-attribute> name="forename" type="<http://schema.openid.net/namePerson/first>" required="true"/>
        <<security:openid-attribute> name="surname" type="<http://schema.openid.net/namePerson/last>" required="true"/>
        <<security:openid-attribute> name="name" type="<http://schema.openid.net/namePerson/friendly>" required="true"/>
        <!--Yahoo-->
        <<security:openid-attribute> name="fullname" type="<http://axschema.org/namePerson>" required="true"/>
        <<security:openid-attribute> name="email" type="<http://axschema.org/contact/email>" required="true"/>
    </security:attribute-exchange>
    

    Read more: <http://luan-itworld.blogspot.com/2013/09/yahoo-openid-attribute-exchange.html>

    0

Recent Posts

in OpenID General Discussion