Friday, April 20, 2018

Re: Authentication Django RestFramework

Dear Musharaf,

If you want authentication built-in you should use Django and not Django REST Framework.



On Fri, Apr 20, 2018 at 2:58 PM, Andréas Kühne <andreas.kuhne@hypercode.se> wrote:
Hi Musharef,

Yes, everything you are asking for is possible. However as far as I know there is no standard solution for your problem, you will have to write all of that by yourself. That being said, it's not that hard:
1. A view for registration - returns a created username / password - or the username / password the user choose.
2. You have a counter on the user that increments on every request before they are a paying user.
3. Tokens don't need to expire unless you want them to.

Med vänliga hälsningar,

Andréas

2018-04-19 21:38 GMT+02:00 Musharaf Baig <musharaf715@gmail.com>:

There is not register/login mechanism for users.

I need two types of authentication:

  1. To make it available I would like to let the user use it for free with a limited number of call s or time

- for example after the API is called 50 times, I would like that the token expires. An alternative solution is that  the token should expire in 2 days.

2) An authentication with a key that does not expire at all.

Is this possible? Need suggestions. Thanks.


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/27c80056-e9c7-4375-998c-d5304a3d7c5d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAK4qSCeYbBpcaAGM5OeiDxLA9uoaY4ZpVYSx0XdC-2t5XKc2AQ%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.



--

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2B83b8Jj6aAwaXn3CfBJOArjJjvQzn9hvm-rc8G7KXhUygKNmw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment