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

implementing JWT for rest api #1134

Merged
merged 7 commits into from
Oct 13, 2022
Merged

Conversation

RohanKaran
Copy link
Contributor

@RohanKaran RohanKaran commented Sep 30, 2022

Proposed Changes

  • closes Add support for JWT #1047
  • Implementation of JWT using Simple JWT
  • Added all relevant endpoints regarding JWT.
  • But kept the login endpoint which sends a non-expiring token and also during registration it sends the same token in response. Let me know when to remove those.

Please check that the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Added yourself to AUTHORS.rst

Other questions

  • Do users need to run some commmands in their local instances due to this PR
    (e.g. database migration)?
    No

@rolandgeider
Copy link
Member

Great! I would leave the older login endpoints for the moment, there are probably other people that are using them, but should add some deprecation warning to the docs.

Could you add some kind of usage for this? We can basically use the same ones from their docs https://django-rest-framework-simplejwt.readthedocs.io/en/latest/getting_started.html#usage

@RohanKaran
Copy link
Contributor Author

@rolandgeider Can you specify where I would add the usage for jwt endpoints ?

@rolandgeider
Copy link
Member

The api docs are in sofware/templates/api.html (at least for the moment, they should be reworked one of these days)

@RohanKaran
Copy link
Contributor Author

@rolandgeider docs added

@rolandgeider
Copy link
Member

great, I will try to test this today or tomorrow

@rolandgeider
Copy link
Member

This looks great thanks.

We're very close to releasing these next days so would wait to merging this since it is a rather important change. The PR is approved so it counts towards hacktoberfest (and I'll merge it next week or so when we've released anyway)

@RohanKaran
Copy link
Contributor Author

RohanKaran commented Oct 4, 2022

Cool 👍 My hacktoberfest task is already completed though 😃.

@rolandgeider rolandgeider merged commit 6bf5ff6 into wger-project:master Oct 13, 2022
@RohanKaran RohanKaran changed the title implementing jwt token for rest api implementing JWT for rest api Oct 15, 2022
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.

Add support for JWT
2 participants