Skip to content

Commit 1e8d66b

Browse files
committed
Merge migrations and sort imports isort for flake8 lint check
1 parent c93d677 commit 1e8d66b

File tree

9 files changed

+23
-58
lines changed

9 files changed

+23
-58
lines changed

oauth2_provider/migrations/0003_auto_20190413_2007.py

Lines changed: 0 additions & 21 deletions
This file was deleted.

oauth2_provider/migrations/0004_idtoken.py renamed to oauth2_provider/migrations/0003_auto_20200902_2022.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,20 @@ class Migration(migrations.Migration):
99

1010
dependencies = [
1111
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
12-
('oauth2_provider', '0003_auto_20190413_2007'),
12+
('oauth2_provider', '0002_auto_20190406_1805'),
1313
]
1414

1515
operations = [
16+
migrations.AddField(
17+
model_name='application',
18+
name='algorithm',
19+
field=models.CharField(choices=[('RS256', 'RSA with SHA-2 256'), ('HS256', 'HMAC with SHA-2 256')], default='RS256', max_length=5),
20+
),
21+
migrations.AlterField(
22+
model_name='application',
23+
name='authorization_grant_type',
24+
field=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),
25+
),
1626
migrations.CreateModel(
1727
name='IDToken',
1828
fields=[
@@ -30,4 +40,9 @@ class Migration(migrations.Migration):
3040
'swappable': 'OAUTH2_PROVIDER_ID_TOKEN_MODEL',
3141
},
3242
),
43+
migrations.AddField(
44+
model_name='accesstoken',
45+
name='id_token',
46+
field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='access_token', to=oauth2_settings.ID_TOKEN_MODEL),
47+
),
3348
]

oauth2_provider/migrations/0005_accesstoken_id_token.py

Lines changed: 0 additions & 20 deletions
This file was deleted.

oauth2_provider/oauth2_validators.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,8 @@
2727

2828
from .exceptions import FatalClientError
2929
from .models import (
30-
AbstractApplication,
31-
get_access_token_model,
32-
get_id_token_model,
33-
get_application_model,
34-
get_grant_model,
35-
get_refresh_token_model,
30+
AbstractApplication, get_access_token_model, get_application_model,
31+
get_grant_model, get_id_token_model, get_refresh_token_model
3632
)
3733
from .scopes import get_scopes_backend
3834
from .settings import oauth2_settings

oauth2_provider/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
oidc_urlpatterns = [
3131
re_path(r"^\.well-known/openid-configuration/$", views.ConnectDiscoveryInfoView.as_view(),
32-
name="oidc-connect-discovery-info"),
32+
name="oidc-connect-discovery-info"),
3333
re_path(r"^jwks/$", views.JwksInfoView.as_view(), name="jwks-info"),
3434
re_path(r"^userinfo/$", views.UserInfoView.as_view(), name="user-info")
3535
]

tests/test_authorization_code.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@
1313
from oauthlib.oauth2.rfc6749 import errors as oauthlib_errors
1414

1515
from oauth2_provider.models import (
16-
get_access_token_model,
17-
get_application_model,
18-
get_grant_model,
19-
get_refresh_token_model,
16+
get_access_token_model, get_application_model,
17+
get_grant_model, get_refresh_token_model
2018
)
2119
from oauth2_provider.settings import oauth2_settings
2220
from oauth2_provider.views import ProtectedResourceView

tests/test_implicit.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
from urllib.parse import parse_qs, urlparse
2-
31
import json
2+
from urllib.parse import parse_qs, urlparse
43

54
from django.contrib.auth import get_user_model
65
from django.test import RequestFactory, TestCase
76
from django.urls import reverse
8-
97
from jwcrypto import jwk, jwt
108

119
from oauth2_provider.models import get_application_model

tests/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from django.urls import include, re_path
21
from django.contrib import admin
2+
from django.urls import include, re_path
33

44

55
admin.autodiscover()

tox.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ deps =
3535
pytest-xdist
3636
py27: mock
3737
requests
38-
jwcrypto
3938

4039
[testenv:py37-docs]
4140
basepython = python

0 commit comments

Comments
 (0)