Skip to content

enabled OPTIONS and meta data of AuthToken #2424

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

Closed
wants to merge 1 commit into from
Closed

enabled OPTIONS and meta data of AuthToken #2424

wants to merge 1 commit into from

Conversation

betaver
Copy link

@betaver betaver commented Jan 16, 2015

Utilize GenericAPIView instead of APIView to enabled OPTIONS and meta data of token based auth.

Now, when OPTIONS an 'obtain auth token' endpoint, it returns full information like this

{
"name":"Obtain Auth Token",
...
"actions":{
    "POST":
    {
        "username":{"type":"string","required":true,"read_only":false,"label":"Username"},
        "password":{"type":"string","required":true,"read_only":false,"label":"Password"}}}}

}

which is much more friendly to consumer, Swagger, and Browerable API than before.

Utilize GenericAPIView instead of APIView to enabled OPTIONS and meta data of token based auth.
@tomchristie
Copy link
Member

Okay, alternative take may be for us to consider ensuring the meta implementation doesn't need a full GenericAPIView, but can also get the additional info so long as there's at least a .serializer_class attribute, if the get_serializer method does not exist.

@maurodoglio
Copy link
Contributor

Happy to take this 😺

@betaver
Copy link
Author

betaver commented Mar 22, 2015

Thanks!

March 22 2015 8:25 PM, "Mauro Doglio" wrote:

 
Happy to take this 

—

Reply to this email directly or view it on GitHub (https://github.com/tomchristie/django-rest-framework/pull/2424#issuecomment-84598328). 

 

@maurodoglio
Copy link
Contributor

This can probably be closed once #2743 gets merged

@tomchristie
Copy link
Member

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants