-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added functionality for superusers and users to create and manage API keys, with Knox integration for secure key hashing.
- Loading branch information
NEZRI Ygal
authored and
NEZRI Ygal
committed
Jul 24, 2024
1 parent
fb81f59
commit 265e73d
Showing
2 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Generated by Django 5.0.2 on 2024-07-24 12:07 | ||
|
||
import django.db.models.deletion | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
('knox', '0008_remove_authtoken_salt'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='APIKey', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('auth_token', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='knox.authtoken')), | ||
], | ||
options={ | ||
'verbose_name': 'API Key', | ||
'verbose_name_plural': 'API Keys', | ||
}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters