Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force DRF Docs to provide Headers input #638

Merged
merged 1 commit into from
Sep 6, 2016

Conversation

ian-ross
Copy link
Contributor

@ian-ross ian-ross commented Sep 2, 2016

Proposed changes in this pull request

The live API endpoints provided by the DRF Docs tool that live at /api/v1/docs need to provide a way of setting up HTTP headers to provide an authentication token (by setting an Authorization header to say Token <token-value>). This is because of some default settings in the DRF Docs setup. This PR changes those settings to force DRF Docs to provide a way of setting headers for all the live API endpoints.

When should this PR be merged

I believe that this can be merged at any time, but I'd like for @linzjax and @oliverroick to take a look at it first.

Risks

Low to none.

Follow up actions

None.

@ian-ross ian-ross force-pushed the enhancement/drf-docs-authentication branch from e17724d to 4f3c296 Compare September 2, 2016 19:51
@linzjax
Copy link
Contributor

linzjax commented Sep 4, 2016

Seems to work for basic stuff, but I'm getting an authentication error for anything that requires a token:

screen shot 2016-09-04 at 7 11 57 pm

@oliverroick oliverroick added this to the Sprint 8 milestone Sep 5, 2016
@ian-ross ian-ross force-pushed the enhancement/drf-docs-authentication branch from 4f3c296 to d82fa55 Compare September 6, 2016 05:37
This is needed to be able to provide an authentication token to drive
the API endpoints from the HTML API views.
@oliverroick
Copy link
Member

@linzjax It works for me, I think, you forgot to add Token before the actual token in the authorization header.

@oliverroick oliverroick force-pushed the enhancement/drf-docs-authentication branch from d82fa55 to 9de5ae1 Compare September 6, 2016 15:57
@oliverroick oliverroick merged commit f5d098b into master Sep 6, 2016
@oliverroick oliverroick deleted the enhancement/drf-docs-authentication branch September 6, 2016 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants