Rest framework on EC2: Authentication credentials were not provided

1,388 views
Skip to first unread message

Stefano Tranquillini

unread,
Jun 26, 2013, 12:09:55 PM6/26/13
to django-res...@googlegroups.com
HI all.
i've a project deployed on EC2 of amazon. it works on token authentication plus an authentication that i developed.
basically it needs:

Authorization: Token XXXXX
APP_ID: XXX

in the header

if i test it on my pc everything works. 

when deployed on EC2 i've back this

{
    "detail": "Authentication credentials were not provided."
}

configuration is the same for the restAPI. i don't understand where the problem is.

Tom Christie

unread,
Jun 26, 2013, 1:59:47 PM6/26/13
to django-res...@googlegroups.com
Some web servers (For example, Apache I think?) strip the authentication header. Have a search around for configuring the header with whichever web server you're using.


--
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.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Stefano Tranquillini

unread,
Jun 27, 2013, 3:16:37 AM6/27/13
to django-res...@googlegroups.com
i found it in the documentation. it took me a while to understand that was the server cutting out the headers.


--
You received this message because you are subscribed to a topic in the Google Groups "Django REST framework" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-rest-framework/eN7cQqZ5Oik/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-rest-fram...@googlegroups.com.

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



--
Stefano

Joshua Bartholomew

unread,
May 16, 2014, 5:36:45 PM5/16/14
to django-res...@googlegroups.com
I am new to this group, and to Django rest_framework... and relatively new to Django. I spent WAY too long trying to find the answer to this problem. Yes, I know it's in the documentation. I think the reason I couldn't find it, and maybe the reason why others are having trouble finding this, is that it isn't identified in the docs by the associated error, but it's identified by mod_wsgi. I was convinced I was having a problem with django. When I searched for {"detail": "Authentication credentials were not provided."} I wasn't able to find much in the documentation. Now, of course everything makes sense. It would just make it easier to find this if, it said something like this, "If you're using mod_wsgi, add this line to your config file, or else you'll get this error with Token Authentication: { "detail": "Authentication credentials were not provided." } " Searching the docs for the error would then show this result. 

HUGE thanks to Tom Christie for DRF, and all the support on this group and Stackoverflow


On Thursday, June 27, 2013 3:16:37 AM UTC-4, Stefano Tranquillini wrote:
i found it in the documentation. it took me a while to understand that was the server cutting out the headers.
On Wed, Jun 26, 2013 at 7:59 PM, Tom Christie <christ...@gmail.com> wrote:
Some web servers (For example, Apache I think?) strip the authentication header. Have a search around for configuring the header with whichever web server you're using.



On 26 Jun 2013, at 17:09, Stefano Tranquillini <stefano.tr...@gmail.com> wrote:

HI all.
i've a project deployed on EC2 of amazon. it works on token authentication plus an authentication that i developed.
basically it needs:

Authorization: Token XXXXX
APP_ID: XXX

in the header

if i test it on my pc everything works. 

when deployed on EC2 i've back this

{
    "detail": "Authentication credentials were not provided."
}

configuration is the same for the restAPI. i don't understand where the problem is.

--
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-framework+unsub...@googlegroups.com.

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

--
You received this message because you are subscribed to a topic in the Google Groups "Django REST framework" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-rest-framework/eN7cQqZ5Oik/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-rest-framework+unsub...@googlegroups.com.

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



--
Stefano

Tom Christie

unread,
May 19, 2014, 8:08:16 AM5/19/14
to django-res...@googlegroups.com
Sounds like a good pull request to make - be sure to include a hyperlink to this discussion if you (or anyone else) gets onto this.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages