Skip to content

Commit

Permalink
docs(document): support readthedocs
Browse files Browse the repository at this point in the history
  • Loading branch information
SolardiaX committed Feb 19, 2021
1 parent 8bb81e0 commit daafca6
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 37 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
docs/_build/
docs/_templates/
examples/**/*.db

dist/
15 changes: 0 additions & 15 deletions AUTHORS

This file was deleted.

21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Flask-Identity
A lightweight extension & library to security Flask applications quickly and simply.

About Flask-Identity
------------------
--------------------

Flask-Identity allows you to quickly add common security mechanisms to your
Flask application. They include:
Expand Down
12 changes: 12 additions & 0 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,18 @@ These configuration are used globally across all features and should be configur

Default: ``'_next'``.

.. py:data:: HASH_SALT
Specifies the HMAC salt. This is required for all schemes that
are configured for double hashing. A good salt can be generated using:
``secrets.SystemRandom().getrandbits(128)``.

If this value is ``None`` (the default), then will use ``SECRET_KEY`` as salt to encrypt hash.

Strongly recommend set it to a different value for more security.

Defaults to ``None``.

.. py:data:: TOKEN_SALT
The salt used to encrypt session, request or cookie token.
Expand Down
6 changes: 6 additions & 0 deletions flask_identity/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@
#: Default: ``'_next'``.
'NEXT_KEY': '_next',

#: Specifies the HMAC salt. This is required for all schemes that
#: are configured for double hashing. A good salt can be generated using:
#: ``secrets.SystemRandom().getrandbits(128)``.
#: Defaults to ``None``.
'HASH_SALT': None,

#: The salt used to encrypt session, request or cookie token.
#: If this value is ``None`` (the default), then will use ``SECRET_KEY`` as salt
#: to encrypt token.
Expand Down

0 comments on commit daafca6

Please sign in to comment.