Auth

24 views
Skip to first unread message

göktürk sığırtmaç

unread,
Aug 15, 2019, 10:38:36 AM8/15/19
to Django REST framework
I was login (/admin) in my app. Later when I want to access profile endpoint (this endpoint have IsAuthenticated as permission) i have 401 error. Why?

Carl Nobile

unread,
Aug 15, 2019, 12:01:54 PM8/15/19
to django-res...@googlegroups.com
Humm, I've never had this issue. Have you set up the permissions on the views correctly?
It's kind of difficult making definitive statements about this without seeing code.

On Thu, Aug 15, 2019 at 10:38 AM göktürk sığırtmaç <s.gok...@gmail.com> wrote:
I was login (/admin) in my app. Later when I want to access profile endpoint (this endpoint have IsAuthenticated as permission)  i have 401 error. Why?

--
You received this message because you are subscribed to the Google Groups "Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-fram...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-rest-framework/3b3b8a28-9b1e-483c-a7b8-dce9a1677ee3%40googlegroups.com.


--
-------------------------------------------------------------------------------
Carl J. Nobile (Software Engineer)
carl....@gmail.com
-------------------------------------------------------------------------------

Matthew Stroud

unread,
Aug 15, 2019, 12:19:56 PM8/15/19
to django-res...@googlegroups.com
Second on seeing the code.

However, did you enable session based authentication?


From: django-res...@googlegroups.com <django-res...@googlegroups.com> on behalf of Carl Nobile <carl....@gmail.com>
Sent: Thursday, August 15, 2019 10:01 AM
To: django-res...@googlegroups.com <django-res...@googlegroups.com>
Subject: Re: Auth
 



CONFIDENTIALITY NOTICE: This message is intended only for the use and review of the individual or entity to which it is addressed and may contain information that is privileged and confidential. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message solely to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify sender immediately by telephone or return email. Thank you.

göktürk sığırtmaç

unread,
Aug 18, 2019, 6:25:17 AM8/18/19
to Django REST framework
I solved it. I forgot adding 'rest_framework.authentication.SessionAuthentication', into Rest Framework in setting.

15 Ağustos 2019 Perşembe 17:38:36 UTC+3 tarihinde göktürk sığırtmaç yazdı:
Reply all
Reply to author
Forward
0 new messages