Skip to content

Commit

Permalink
Typo fixes in both Readme files
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronny Vedrilla committed Sep 19, 2022
1 parent 45f0ccf commit 7eee6c3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# AI-KIT: Authentication

AI Kit Auth is the one stop shop for authentification related tasks for
ambient innovation.
"AI Kit Auth" is the one-stop shop for authentication related tasks for Ambient Digital.

It targets the following tech stack:

* Django in the back
* React in the front
* Material UI is used for the standard theme, but its not tightly coupled and
* Material UI is used for the standard theme, but it's not tightly coupled and
there are efforts to make it a not necessary dependency
* REST Api
* Sessions authentification. Support for JWT is planned --- not as the main
* Sessions authentication. Support for JWT is planned --- not as the main
auth method, but to enable access to external services for a short amount of
time.

Expand All @@ -26,14 +25,14 @@ Links to the hosted packages:
## Usage

You can find detailed instructions on how to use the frontend and backend libraries
in the READMEs of the respective folders:
in the different README files of the respective folders:
* Backend: [django-app](django-app/README.rst)
* Frontend: [react-lib](react-lib/README.md)

## Contributing

If you want to contribute, please make sure to write commit messages
according to the [conventionalcommits](https://www.conventionalcommits.org/en/v1.0.0/#summary)
according to the [conventional-commits](https://www.conventionalcommits.org/en/v1.0.0/#summary)
specification, because they are the basis for automatic versioning and
changelog generation. Basically, a commit message should have the format

Expand Down Expand Up @@ -81,9 +80,9 @@ See [demo README](examples/email-user/README.md)

Python code should be formatted by black, typescript code by eslint.

### Notes on CSRF protection and authentification strategy
### Notes on CSRF protection and authentication strategy

Ai-Kit-Auth makes use of the standard django session managment and
Ai-Kit-Auth makes use of the standard django session management and
the build in CSRF protection measures. The frontend has to set a `X-CSRFToken`
http header to the current CSRF token value. This token is returned by the
`me/` and the `login` endpoints (the token is rotated by django after login,
Expand Down
15 changes: 6 additions & 9 deletions django-app/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ at the template section of the settings to configure the email templates.
It works with the standard django and with a custom user model as
long as its provides an email address.

Standard Django sessions are used for authentification.
Standard Django sessions are used for authentication.

Index
-----
Expand Down Expand Up @@ -71,7 +71,7 @@ For more details see the
`django-cors-headers <https://github.com/adamchainz/django-cors-headers>`__
documentation.

2.) Configuration is namespaced unter ``AI_KIT_AUTH`` like so:
2.) AI-KIT: Authentication is configured using a single, global setting called ``AI_KIT_AUTH``:

::

Expand Down Expand Up @@ -209,7 +209,7 @@ In addition to that some general configuration is required:

::

CORS_ORIGIN_WHITELIST = [
CORS_ALLOWED_ORIGINS = [
"http://localhost:8000",
"http://localhost:3000",
# add other front-end backend urls
Expand All @@ -230,9 +230,6 @@ Ai-Kit-Auth, but in prevents problems with double logins, for example
if a user is logged into the Admin interface and also logged in the
frontend. Django saves CSRF tokens in cookies by default.

Please note that ``CORS_ORIGIN_WHITELIST`` takes the whole URL including the scheme (e.g. 'http://'), whereas ``CSRF_TRUSTED_ORIGINS`` takes
**only** the domain, for example: "example.org".


3.) Include the routes in your ``urls.py``:

Expand Down Expand Up @@ -276,7 +273,7 @@ expects


both fields are required.
In addition a csrf-token returned from the `/me` call is needed in the request header as X-CSRFTOKEN.
In addition a csrf-token returned from the `/me` call is needed in the request header as X-CSRFToken.
The endpoint answers with the status code 200
and

Expand Down Expand Up @@ -428,7 +425,7 @@ expects
::

{
"ident": <identifer for the user, from the reset link>,
"ident": <identifier for the user, from the reset link>,
"token": <reset token, from the reset link>,
"password": <password>,
}
Expand Down Expand Up @@ -488,7 +485,7 @@ expects
::

{
"ident": <identifer for the user, from the reset link>,
"ident": <identifier for the user, from the reset link>,
"token": <reset token, from the reset link>,
}

Expand Down

0 comments on commit 7eee6c3

Please sign in to comment.