Skip to content

Commit eaee164

Browse files
fvlimawiliamsouza
authored andcommitted
Add missing new attributes to test migration
1 parent 519a28d commit eaee164

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/migrations/0001_initial.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,15 @@ class Migration(migrations.Migration):
4545
('client_id', models.CharField(db_index=True, default=oauth2_provider.generators.generate_client_id, max_length=100, unique=True)),
4646
('redirect_uris', models.TextField(blank=True, help_text='Allowed URIs list, space separated')),
4747
('client_type', models.CharField(choices=[('confidential', 'Confidential'), ('public', 'Public')], max_length=32)),
48-
('authorization_grant_type', models.CharField(choices=[('authorization-code', 'Authorization code'), ('implicit', 'Implicit'), ('password', 'Resource owner password-based'), ('client-credentials', 'Client credentials')], max_length=32)),
48+
('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)),
4949
('client_secret', models.CharField(blank=True, db_index=True, default=oauth2_provider.generators.generate_client_secret, max_length=255)),
5050
('name', models.CharField(blank=True, max_length=255)),
5151
('skip_authorization', models.BooleanField(default=False)),
5252
('created', models.DateTimeField(auto_now_add=True)),
5353
('updated', models.DateTimeField(auto_now=True)),
5454
('custom_field', models.CharField(max_length=255)),
5555
('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='tests_sampleapplication', to=settings.AUTH_USER_MODEL)),
56+
('algorithm', models.CharField(max_length=5, choices=[('RS256', 'RSA with SHA-2 256'), ('HS256', 'HMAC with SHA-2 256')], default='RS256')),
5657
],
5758
options={
5859
'abstract': False,
@@ -71,6 +72,7 @@ class Migration(migrations.Migration):
7172
('application', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.OAUTH2_PROVIDER_APPLICATION_MODEL)),
7273
('source_refresh_token', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='s_refreshed_access_token', to=settings.OAUTH2_PROVIDER_REFRESH_TOKEN_MODEL)),
7374
('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='tests_sampleaccesstoken', to=settings.AUTH_USER_MODEL)),
75+
('id_token', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='access_token', to=settings.OAUTH2_PROVIDER_ID_TOKEN_MODEL)),
7476
],
7577
options={
7678
'abstract': False,
@@ -83,14 +85,15 @@ class Migration(migrations.Migration):
8385
('client_id', models.CharField(db_index=True, default=oauth2_provider.generators.generate_client_id, max_length=100, unique=True)),
8486
('redirect_uris', models.TextField(blank=True, help_text='Allowed URIs list, space separated')),
8587
('client_type', models.CharField(choices=[('confidential', 'Confidential'), ('public', 'Public')], max_length=32)),
86-
('authorization_grant_type', models.CharField(choices=[('authorization-code', 'Authorization code'), ('implicit', 'Implicit'), ('password', 'Resource owner password-based'), ('client-credentials', 'Client credentials')], max_length=32)),
88+
('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)),
8789
('client_secret', models.CharField(blank=True, db_index=True, default=oauth2_provider.generators.generate_client_secret, max_length=255)),
8890
('name', models.CharField(blank=True, max_length=255)),
8991
('skip_authorization', models.BooleanField(default=False)),
9092
('created', models.DateTimeField(auto_now_add=True)),
9193
('updated', models.DateTimeField(auto_now=True)),
9294
('allowed_schemes', models.TextField(blank=True)),
9395
('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='tests_basetestapplication', to=settings.AUTH_USER_MODEL)),
96+
('algorithm', models.CharField(max_length=5, choices=[('RS256', 'RSA with SHA-2 256'), ('HS256', 'HMAC with SHA-2 256')], default='RS256')),
9497
],
9598
options={
9699
'abstract': False,

0 commit comments

Comments
 (0)