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

Authentication with Swagger #27

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Authentication with Swagger #27

wants to merge 9 commits into from

Conversation

DamiAdesola
Copy link

My Changes
-Added Swagger, to allow better visualisation of API(added in requirements.txt file).
-Added Authentication app, which allows users to register.
-Added Email Verification, which sends users verification tokens, which can then be successfully verified on the API (Email used is a test Gmail account. Details are in the setting.py file in ‘web app’.

  • Added Password and Token Reset by Email
    -Added Token Authentication check
    -Edited Read Me with Basic User Login and Registration Instructions

Have a look, and run the API. Then if you decide I should separate them. Then I will work on separating them.

Oluwadamilola Adesola added 5 commits August 2, 2020 10:12
-Added Swagger, to allow better visualisation of API(added in requirements.txt file).
-Added Authentication app, which allows users to register.
-Added Email Verification, which sends users verification tokens, which can then be successfully verified on the API (Email used is a test Gmail account. Details are in the setting.py file in ‘webapp’.
- Added all Serializations and Models required to, register verify and login Users
-Added Jwt for token generation (added in requirements.txt file)
-Two tokens are generated, refresh and access
- Added login through Swagger interface, which requires users to input generated token, to access information from the API.
-Added Renderers in order to ensure consistent responses in the API, especially when an error is generated.
-Added Swagger, to allow better visualisation of API(added in requirements.txt file).
-Added Authentication app, which allows users to register.
-Added Email Verification, which sends users verification tokens, which can then be successfully verified on the API (Email used is a test Gmail account. Details are in the setting.py file in ‘webapp’.
- Added Password and Token Reset by Email
-Added Token Authentication check
-Edited Read Me with Basic User Login and Registration Instructions
@DamiAdesola DamiAdesola added the enhancement New feature or request label Aug 5, 2020
@DamiAdesola DamiAdesola requested a review from jbinvnt August 5, 2020 20:53
@DamiAdesola DamiAdesola self-assigned this Aug 5, 2020
@DamiAdesola DamiAdesola linked an issue Aug 5, 2020 that may be closed by this pull request
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
def test_user_can_register_correctly(self):
res = self.client.post(
self.register_url, self.user_data, format="json")
#self.assertEqual(res.data['email'] ,self.user_data['email'])
Copy link
Member

Choose a reason for hiding this comment

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

Were these temporarily commented out because they were failing? If so, I would suggest fixing the issue causing them to fail and uncommenting.

Copy link
Author

Choose a reason for hiding this comment

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

Yes, I was having an import Issue. Sorting it out now

Comment on lines +40 to +47
email = serializers.EmailField(
max_length=255, min_length=8)
password = serializers.CharField(
max_length=68, min_length=3, write_only=True)
username = serializers.CharField(
max_length=255, min_length=3, read_only=True)
tokens = serializers.CharField(
max_length=68, min_length=3,read_only=True)
Copy link
Member

Choose a reason for hiding this comment

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

Is there a need for these specific min and max length values? If so, the source should be documented. Otherwise, in my experience all min/max length constraints should be set in the model and not in the serializer. Also, I believe that the email, password, and username fields all will be inherited automatically from the User model, so we should not need to add them manually here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add API visualization
2 participants