This is a follow up from our email conversation where we stated that it would be good to expand upon openid_cp_field rather than putting a competitor module out there.

Aron Novak has worked on a content_profile / OpenID integration that has a nice UI, supports per content type mappings and supports OpenID client and provider:

http://skitch.com/alexbarth/bj7s7/profile-aron.devseed.com
http://svn3.cvsdude.com/vvc/devseed/sandbox/drupal-6/content_profile_ope...

It should be easy to move this functionality into openid_cp_field. If there are problems with mapping incompatibilities with existing deployments we should take care of them with an update hook.

Comments

aron novak’s picture

Assigned: Unassigned » aron novak

I'll take care about this.

darren.ferguson’s picture

Aron, thanks

alex_b’s picture

There is also attribute/field mapping in OpenID Client AX - Darren - we should be able to abandon this in favor of server and client support in OpenID Content Profile Field, right?

Aron: you see that there is also SREG support in OpenID Content Profile Field.

darren.ferguson’s picture

We could get rid of that yes, provided we made sure content profile was enabled on the provider and relying party

The reason it is there currently is so the correct request goes out with the correct namespaces. We might want to determine if that is a good idea to put it into the cp module and thus force people to utilize it.

aron novak’s picture

Status: Active » Needs work
StatusFileSize
new14.78 KB

#3: I'm aware of sreg support here. I suggest to extend

#4: 'openid_cp_field_map' - where is this hook implemented? Maybe i overlook something but i could not try out my patch without this.

The patch below is only for the first draft, it's not tested.

darren.ferguson’s picture

Aron will test and see how it performs.

aron novak’s picture

Hm, the patch is not in testable status unfortunately.
To achieve testable status, I need to understand the current workflow of the module.
Can you point me where openid_cp_field_get_value comes into the play?

darren.ferguson’s picture

The openid_cp_field_get_value is utilized too ask for two hooks that link too the content profile fields permissions. If a user has decided they want their fields to be private then openid will respect those privacy rules in this function, it verifies whether it is allowed too and if so it retrieves the value if not then it just returns NULL.

The two hooks access and value in that can be implemented by any module and we have them implemented i believe in one of the content profile sub modules i believe, one of our other guys Alex K does that, i will find out which module utilizes that.

alex_b’s picture

aron novak’s picture

StatusFileSize
new4.4 KB

Here is where i'm now.
Sreg mapping UI is added.
What's missing:
Add the populating of content fields (maybe instead of the hook calls)

aron novak’s picture

Hm, it seems that i cannot delete the last file, it was posted accidentally :)
Here is the correct file.

aron novak’s picture

Current status:
Good UI for SReg mapping also
Draft code for returning the value (instead of calling external modules)

Missing:
Export for SReg
Test that the _openid_cp_field_get_value() actually works or not
Test is with both openid_provider_ax and openid_client_ax

aron novak’s picture

At #12, I forgot to attach the patch file, but here is a newer version.

I coded on hook_openid_provider_ax() because it was not adequate originally (the parameters were not the same as in openid_provider_ax)
I assume openid_client_ax should only call openid_cp_field_get_mapping() simply, the other logic can remain in openid_client_ax.
Export works for sreg as well.
To actually try it out, first openid_client_ax needs to be compatible with openid_cp_field.

aron novak’s picture

Minor modifications on the previous one according to http://drupal.org/node/434378#comment-1484264 (for openid_client_ax)
The two patches really needs to go together.
Be aware that these patches still need testing. It contains all the concept and logic that i'd like to implement.

aron novak’s picture

This patch is ready to try out now. To make it work, check out the openid roadmap (http://groups.drupal.org/node/21221) and apply #434378: Move mapping functionality to openid_cp_field to openid_client_ax.

This is in "needs work" status because of the following:
- SReg support is not here, because I haven't started #430332: Make SREG independent of Persona yet.
- at this point we cannot declare if an attribute is required or optional. It needs to be discussed. Do you see such a use-case when you would like to refuse the openid registration because of a missing attribute?

I tested and it works well, i did map CCK and body fields to openid attributes and the whole process seemed to be convient.

darren.ferguson’s picture

Aron, the patch 5 the last one has been applied to the openid_cp_fields branch DRUPAL-6--1 in CVS http://drupal.org/cvs?commit=198642 is the cvs commit

darren.ferguson’s picture

Status: Needs work » Active

If this piece can be closed you can close it not sure if you are going to be adding more to this or not.

aron novak’s picture

darren.ferguson: Thank you, it's great to see this patch in the CVS logs :)
I would like to discuss one thing with you before closing this ticket:
At this point we cannot declare if an attribute is required or optional. Do you see such a use-case when you would like to refuse the openid registration because of a missing attribute? You know, openid_client_ax supported this feature, I assume if we want this feature, the mapping UI should support it also. What do you think?

aron novak’s picture

StatusFileSize
new1.41 KB

Here is a fix (extremely important) for the mistake I did in the patch what was committed.
The issue is: the exchange of the attributes did not happen according to the specs.

darren.ferguson’s picture

Aron,

The patch is now in CVS regarding above.

"At this point we cannot declare if an attribute is required or optional. Do you see such a use-case when you would like to refuse the openid registration because of a missing attribute? You know, openid_client_ax supported this feature, I assume if we want this feature, the mapping UI should support it also. What do you think?"

I think we might want this purely for the following if the name or email which Drupal needs is non existant and it is not available through simple registration then we should definitely catch that rather than allow Drupal's user module to catch that. I think we should support the feature but the default for each of the mappings should be optional.

aron novak’s picture

Status: Active » Fixed

Darren: thank you for your feedback, this means we don't have to make the UI more complicated to get this feature back, (altough I need to make sure that name and email is always here)

alex_b’s picture

#20, #21: I filed a follow up issue here: #439646: On registration, ensure availability of email and name

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.