|
| 1 | +# Generated by Django 4.2.10 on 2024-04-11 08:22 |
| 2 | + |
| 3 | +from django.conf import settings |
| 4 | +from django.db import migrations, models |
| 5 | +import django.db.models.deletion |
| 6 | +import oauth2_provider.generators |
| 7 | +import oauth2_provider.models |
| 8 | + |
| 9 | + |
| 10 | +class Migration(migrations.Migration): |
| 11 | + |
| 12 | + dependencies = [ |
| 13 | + ('api', '0001_initial'), |
| 14 | + ] |
| 15 | + |
| 16 | + operations = [ |
| 17 | + migrations.CreateModel( |
| 18 | + name='Application', |
| 19 | + fields=[ |
| 20 | + ('id', models.BigAutoField(primary_key=True, serialize=False)), |
| 21 | + ('client_id', models.CharField(db_index=True, default=oauth2_provider.generators.generate_client_id, max_length=100, unique=True)), |
| 22 | + ('redirect_uris', models.TextField(blank=True, help_text='Allowed URIs list, space separated')), |
| 23 | + ('post_logout_redirect_uris', models.TextField(blank=True, help_text='Allowed Post Logout URIs list, space separated')), |
| 24 | + ('client_type', models.CharField(choices=[('confidential', 'Confidential'), ('public', 'Public')], max_length=32)), |
| 25 | + ('authorization_grant_type', models.CharField(choices=[('authorization-code', 'Authorization code'), ('implicit', 'Implicit'), ('password', 'Resource owner password-based'), ('client-credentials', 'Client credentials'), ('openid-hybrid', 'OpenID connect hybrid')], max_length=32)), |
| 26 | + ('client_secret', oauth2_provider.models.ClientSecretField(blank=True, db_index=True, default=oauth2_provider.generators.generate_client_secret, help_text='Hashed on Save. Copy it now if this is a new secret.', max_length=255)), |
| 27 | + ('name', models.CharField(blank=True, max_length=255)), |
| 28 | + ('skip_authorization', models.BooleanField(default=False)), |
| 29 | + ('created', models.DateTimeField(auto_now_add=True)), |
| 30 | + ('updated', models.DateTimeField(auto_now=True)), |
| 31 | + ('algorithm', models.CharField(blank=True, choices=[('', 'No OIDC support'), ('RS256', 'RSA with SHA-2 256'), ('HS256', 'HMAC with SHA-2 256')], default='', max_length=5)), |
| 32 | + ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s', to=settings.AUTH_USER_MODEL)), |
| 33 | + ], |
| 34 | + options={ |
| 35 | + 'abstract': False, |
| 36 | + }, |
| 37 | + ), |
| 38 | + ] |
0 commit comments