Skip to content
This repository has been archived by the owner on Feb 21, 2020. It is now read-only.

API auth token #38

Open
hectorperez opened this issue Nov 10, 2013 · 2 comments
Open

API auth token #38

hectorperez opened this issue Nov 10, 2013 · 2 comments

Comments

@hectorperez
Copy link

"When you call the login API function, the user token is returned" [1]

It seems that the token is NOT returned [2].

[1] https://agora-ciudadana.readthedocs.org/en/latest/api.html#authentication
[2] https://agora-ciudadana.readthedocs.org/en/latest/api.html#user-login

@edulix
Copy link
Contributor

edulix commented Nov 21, 2013

That's a typo in the documentation, actually. After that phrase, it also says "Currently the user token is currently only accesible through administrators that can access to the django shell". This is because for now, we wanted to limit the automatization of tasks through the API to a set of known users. I feel that your usecase might be different? to do what you suggest we could add a new feature to return the api_key when token_auth is activated in custom_settings.py, which shouldn't be very difficult to do.

@voodoorai2000
Copy link
Contributor

Excellent!

Yes the use case for this is the ruby wrapper[1] for the AgoraVoting API.
Activating token authentication and sending the user token on the response of the API login call, would be perfect.

The other part of this feature would be that once the user token in sent on a call to the AgoraVoting API,
the user would be authorized to do it's corresponding actions, like voting in one of his agoras.

[1] https://github.com/agoraciudadana/agoravoting-rb

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants