This module were perfect for us, untill we needed support for multiple API keys. So I created an patch to allow inserting multiple API keys, but I'm not familiar with how to do proper services auth stuff, and even stumbled upon some strange issue that services wouldn't call my validation and submit callbacks. Because of this, I resorted into altering the form and removing some buttons that will probably break other auth functionalities if present.
So this patch does do the trick, but it should be completely rewritten (or maybe this whole module to have more features) for it to be good for merging into actual module - if there's even interest for it.
Comment | File | Size | Author |
---|---|---|---|
#5 | services_api_key_auth-multiple-api-keys-7.patch | 7.71 KB | patpluspun |
services_api_key_auth-multiple-api-keys-0.patch | 6.32 KB | jussil |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedI agree the module is really usefull, but for my case I need an api key for every user that creates an account. Is this possible to integrate into the api key module?
Comment #2
francois.soulard CreditAttribution: francois.soulard commentedThanks "jussil" for your commit.
It helps me a lot.
Just a notice for other user, i had to completly remove (uncheck, then uninstall) and reinstall the api_key_module to have it functionnal.
To my mind, it must be include in api_key_module which is a good module to !
Comment #3
colanI'm assuming the point of creating the Services API Keys Authentication module was to handle this use case.
So we should probably put something on the front page here recommending the other module if multiple keys are required.
Comment #4
colanI just added a note about the other module on the this project page, but as the new maintainer, I'm open to adding support for this here. Patches welcome.
I'd recommend that whoever works on this takes a look at the code in the other module, and incorporates it with the patch above.
Comment #5
patpluspun CreditAttribution: patpluspun at The Weather Company commentedHi colan! Came across this module and it works perfectly except for this exact issue. I took the liberty of finishing and adding a bit of polish. It may still need some work, feel free to provide feedback and I can continue to work on it to satisfaction.
I kept the single key authentication, and also added the option for users assigned to the correct role to have keys generated.
Comment #6
colanThanks! Hopefully someone else can review this soon if I don't get a chance. (I'm not doing much with Drupal 7 these days.)
Comment #7
parasolx CreditAttribution: parasolx as a volunteer and at Hadafi Solution & Resources commentedI just apply this patch and so far it works fine. However, the session generates when request different user won't generate correctly. So everytime request through API key, the user is considered as anonymous user instead of roles that tie to the API key.
Comment #8
parasolx CreditAttribution: parasolx as a volunteer and at Hadafi Solution & Resources commentedI just revert back to the previous version. The cookies and sessions generate well as the user account.
Comment #9
colanThanks for testing.