Currently a session id can be used on a per remote call basis. It would be benefical if this approach could be extended for api keys. This would allow for open and closed calls. I have attached a patch to provide this functionality.

Comments

marcingy’s picture

Status: Active » Needs review
marcingy’s picture

StatusFileSize
new1.23 KB

Patch re-rolled for drupal 6

marcingy’s picture

StatusFileSize
new1.23 KB

re-rolled against final drupal 6 services patch

marcingy’s picture

Assigned: Unassigned » marcingy
nedjo’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev

+1

Yes, keys may be needed for some services but not for others. Example: site offers two services, remote node editing (exposed in a tightly controlled way) and a weather forecast service (available to anyone).

Comments:

1. At a minimum, we need a way to convey to site admins that some services require keys and others don't.

2. We could consider making this an admin setting rather than a new metadata attribute.

3. Assuming we don't move to a setting, the patch should add this #key setting to existing services.

marcingy’s picture

I'll re roll a version 5 and 6 patch which applies the key attribute to existing functions. Might take me a couple of days but it is on it way.

magico’s picture

I think that we don't need to define if a function needs a key or not in the code.

In fact, any function should use keys (or not) based only on the site services settings.

Let's think for a moment: if we have a way to specify (in the site administration) which services require keys, why would we specify that in code? And a service that needs a key today, perhaps does not need it tomorrow.

marcingy’s picture

Status: Needs review » Closed (fixed)