Discussion:
Rest framework on EC2: Authentication credentials were not provided
Joshua Bartholomew
2014-05-16 21:36:45 UTC
Permalink
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
i found it in the documentation. it took me a while to understand that was
the server cutting out the headers.
here the tip
http://django-rest-framework.org/api-guide/authentication.html#apache-mod_wsgi-specific-configuration
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.
HI all.
i've a project deployed on EC2 of amazon. it works on
token authentication plus an authentication that i developed.
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
.
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
For more options, visit https://groups.google.com/groups/opt_out.
--
Stefano
--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/d/optout.
Tom Christie
2014-05-19 12:08:16 UTC
Permalink
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.
Post by Joshua Bartholomew
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
i found it in the documentation. it took me a while to understand that
was the server cutting out the headers.
here the tip
http://django-rest-framework.org/api-guide/authentication.html#apache-mod_wsgi-specific-configuration
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.
HI all.
i've a project deployed on EC2 of amazon. it works on
token authentication plus an authentication that i developed.
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
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
For more options, visit https://groups.google.com/groups/opt_out.
--
Stefano
--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/d/optout.
Rajesh Nadar
2018-10-24 11:46:22 UTC
Permalink
Stefano Tranquillini Thanks a lot saved my day :)
i found it in the documentation. it took me a while to understand that was
the server cutting out the headers.
here the tip
http://django-rest-framework.org/api-guide/authentication.html#apache-mod_wsgi-specific-configuration
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.
HI all.
i've a project deployed on EC2 of amazon. it works on
token authentication plus an authentication that i developed.
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
.
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
For more options, visit https://groups.google.com/groups/opt_out.
--
Stefano
--
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+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...