API Tokens #134

Merged
Dalai Felinto merged 6 commits from tokens into main 2024-05-27 12:53:31 +02:00

6 Commits

Author SHA1 Message Date
3698eb681a Address review questions
* Missing save last ip and last access
* token_begin > token_prefix
* inline if/else
* Remove unecessary f-string
* Move methods to class
* Unittests
2024-05-25 13:20:57 +02:00
3fae0fec5b Simplify token message: only show the Token 2024-05-25 11:39:19 +02:00
f8663bdb78 Address review questions
* Rename app: tokens > apitokens
* Remove id from model
* Store last access time and ip (only show time to users)
* Store the hash instead of the token
* Store the begin of the token for easy identification
* Remove other authentication methods
* Use a 32 random byte token
2024-05-25 11:39:19 +02:00
8b17b55080 Fix unittest / access to the public API 2024-05-25 11:39:19 +02:00
cdf12cdf60 Basic authentication using tokens
There is still no API that uses this, but this is working already.
2024-05-25 11:39:19 +02:00
0a58aa7562 API Tokens
This allows users to create tokens to be used with the API.
The goal is to use those for the API that will allow users to upload new
versions of an extension.

The Tokens can be created/managed on the user profile.

Note: There are still no API entries that can use these tokens.
2024-05-25 11:39:19 +02:00