Retrieve OpenId FullName from Google

Posted by user294711 on Stack Overflow See other posts from Stack Overflow or by user294711
Published on 2010-03-16T11:52:01Z Indexed on 2010/03/16 11:56 UTC
Read the original article Hit count: 305

Filed under:
|
|
|

I'm using DotNetOpenAuth lib to work with Google(only) OpenId. And I'm retrieving Email without any problem. But I can't get FullName, it is always null.

request.AddExtension(new ClaimsRequest
        {
            Email = DemandLevel.Require,
            FullName = DemandLevel.Require
        });

ClaimsResponse claimsResponse = relyingPartyResponse.GetExtension<ClaimsResponse>();

                if (claimsResponse != null)
                {
                    var email = claimsResponse.Email;
                    var fullName = claimsResponse.FullName;
                }

I googled this problem and found that:

Glad you got it working. Google will not give a full name or nickname for their users. They ONLY give email address, and (I think, but perhaps only on a white list) the timezone. It's not a matter of figuring out how to rig your RP so that it works. Google just won't do it yet. – Andrew Arnott Sep 8 at 14:22 stackoverflow.com/questions/1387438/retrieve-openid-user-information-claims-across-providers

But it was in Sep 2009, maybe something was changed from that moment... I've found that in http://code.google.com/apis/accounts/docs/OpenID.html:

openid.ax.required -- (required) Specifies the attribute being requested. Valid values include: "country", "email", "firstname", "language", "lastname". To request multiple attributes, set this parameter to a comma-delimited list of attributes.

So, my question is how can I get FullName (FirstName, LastName) from Google OpenId?

© Stack Overflow or respective owner

Related posts about dotnetopenauth

Related posts about openid