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

[api] Use BearerAuthentication #91 #139

Merged
merged 1 commit into from Jul 25, 2020

Conversation

atb00ker
Copy link
Member

Closes #91

Comment on lines +251 to +257
Some endpoints require the sending of the user API access
token sent in the form of a "Bearer Token", example:

.. code-block:: shell

curl -H "Authorization: Bearer <user-token>" \
'http://localhost:8000/api/v1/default/account/session/'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed example from below and added it before all User APIs as the example to use Bearer <user-token> is applicable for multiple User APIs

@@ -126,7 +125,6 @@ def get_serializer(self, *args, **kwargs):


class AuthorizeView(TokenAuthorizationMixin, APIView):
authentication_classes = (TokenAuthentication,)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed from here because TokenAuthorizationMixin already contains authenication_classes`

@coveralls
Copy link

coveralls commented Jul 23, 2020

Pull Request Test Coverage Report for Build 443

  • 7 of 7 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.002%) to 99.199%

Totals Coverage Status
Change from base Build 426: -0.002%
Covered Lines: 1982
Relevant Lines: 1998

💛 - Coveralls

@atb00ker atb00ker self-assigned this Jul 23, 2020
@atb00ker atb00ker added this to In progress in [GSoC20] Merge modules via automation Jul 23, 2020
@atb00ker atb00ker moved this from In progress to Ready for review in [GSoC20] Merge modules Jul 23, 2020
Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@nemesifier nemesifier merged commit 9cb8473 into openwisp:master Jul 25, 2020
[GSoC20] Merge modules automation moved this from Ready for review to Done Jul 25, 2020
@atb00ker atb00ker deleted the issues/91-api-bearer-token branch July 26, 2020 08:31
@atb00ker atb00ker restored the issues/91-api-bearer-token branch July 26, 2020 08:31
@atb00ker atb00ker deleted the issues/91-api-bearer-token branch July 26, 2020 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

[radius/api] Use bearer token for user authentication
3 participants