Skip to content

Commit

Permalink
per build docs
Browse files Browse the repository at this point in the history
  • Loading branch information
PedroBern committed Jan 28, 2020
1 parent 6ae9216 commit 703993e
Show file tree
Hide file tree
Showing 5 changed files with 246 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ test-file:
tox -e py${p}-django${d} -- tests/test_${f}.py --cov-report html --cov-append

serve:
python pre_docs_script.py
python docs/pre_build.py
mkdocs serve

build-docs:
python docs/conf.py
python docs/pre_build.py
mkdocs build

format:
Expand Down
112 changes: 112 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Changelog


## v0.3

### v0.3.0

- release beta


## v0.2

### v0.2.8
- return new token and refreshToken on password change.


### v0.2.7
- allow login on register, returning token and refresh token.


### v0.2.6
- review error fields in some mutations.


### v0.2.5
- update apps config.
- nothing new.


### v0.2.4
- add mutation to remove secondary email.


### v0.2.3
- user status is created on signal.


### v0.2.2
- fix typo in setup.
- nothing new.


### v0.2.1
- fix readme on pypi.
- nothing new.


### v0.2.0
- minor bug fixes.
- add user status model to track if user is archived, verified and secondary email.
- add new mutations to handle secondary email.
- allow login with secondary email.



## v0.1

### 0.1.11
- Fix minor bugs.


### 0.1.10
- Fix minor bugs.


### 0.1.9
- Rename settings params.


### 0.1.8

- Fix typo in settings.


### 0.1.7

- No changes (testing release on Travis).


### 0.1.6

- Support for Django >= 2.1


### 0.1.5

- Revoke refresh tokens when archiving user.


### 0.1.4

- Allow to revoke refresh tokens on password change and reset.


### 0.1.3

- Better settings api.


### 0.1.2

- Update setup.py.


### 0.1.1

- Add initial README file!


### 0.1.0

- Hello world!
5 changes: 5 additions & 0 deletions docs/contributors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Contributors

---

- [@pedrobern](https://github.com/pedrobern)
127 changes: 127 additions & 0 deletions docs/data/api.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
# this file is auto generated by the pre_docs_script.py

Register: |
Register user with fields defined in the settings.
If the email field of the user model is part of the
registration fields (default), check if there is
no user with that email or as a secondary email.
If it exists, it does not register the user,
even if the email field is not defined as unique
(default of the default django user model).
When creating the user, it also creates a `UserStatus`
related to that user, making it possible to track
if the user is archived, verified and has a secondary
email.
Send account verification email.
If allowed to not verified users login, return token.
VerifyAccount: |
Verify user account.
Receive the token that was sent by email.
If the token is valid, make the user verified
by making the `user.status.verified` field true.
VerifySecondaryEmail: |
Verify user secondary email.
Receive the token that was sent by email.
User is already verified when using this mutation.
If the token is valid, add the secondary email
to `user.status.secondary_email` field.
Note that until the secondary email is verified,
it has not been saved anywhere beyond the token,
so it can still be used to create a new account.
After being verified, it will no longer be available.
ResendActivationEmail: |
Sends activation email.
It is called resend because theoretically
the first activation email was sent when
the user registered.
If there is no user with the requested email,
a successful response is returned.
SendPasswordResetEmail: |
Send password reset email.
For non verified users, send an activation
email instead.
Accepts both primary and secondary email.
If there is no user with the requested email,
a successful response is returned.
PasswordReset: |
Change user password without old password.
Receive the token that was sent by email.
If token and new passwords are valid, update
user password and in case of using refresh
tokens, revoke all of them.
ObtainJSONWebToken: |
Obtain JSON web token for given user.
Allow to perform login with different fields,
and secondary email if set. The fields are
defined on settings.
Not verified users can login by default. This
can be changes on settings.
If user is archived, make it unarchive and
return `unarchiving=True` on output.
ArchiveAccount: |
Archive account and revoke refresh tokens.
User must be verified and confirm password.
DeleteAccount: |
Delete account permanently or make `user.is_active=False`.
The behavior is defined on settings.
Anyway user refresh tokens are revoked.
User must be verified and confirm password.
PasswordChange: |
Change account password when user knows the old password.
A new token and refresh token are sent. User must be verified.
UpdateAccount: |
Update user model fields, defined on settings.
User must be verified.
VerifyOrRefreshOrRevokeToken: |
Same as `grapgql_jwt` implementation, with standard output.
SendSecondaryEmailActivation: |
Send activation to secondary email.
User must be verified and confirm password.
SwapEmails: |
Swap between primary and secondary emails.
Require password confirmation.
RemoveSecondaryEmail: |
Remove user secondary email.
Require password confirmation.
File renamed without changes.

0 comments on commit 703993e

Please sign in to comment.