Skip to content

Commit

Permalink
Format with black 23.1.0 (#1247)
Browse files Browse the repository at this point in the history
  • Loading branch information
Qup42 committed Feb 12, 2023
1 parent 31b7694 commit 2073168
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 5 deletions.
1 change: 0 additions & 1 deletion oauth2_provider/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,6 @@ def redirect_to_uri_allowed(uri, allowed_uris):
and parsed_allowed_uri.netloc == parsed_uri.netloc
and parsed_allowed_uri.path == parsed_uri.path
):

aqs_set = set(parse_qsl(parsed_allowed_uri.query))
if aqs_set.issubset(uqs_set):
return True
Expand Down
1 change: 0 additions & 1 deletion oauth2_provider/oauth2_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,6 @@ def save_bearer_token(self, token, request, *args, **kwargs):
and isinstance(refresh_token_instance, RefreshToken)
and refresh_token_instance.access_token
):

access_token = AccessToken.objects.select_for_update().get(
pk=refresh_token_instance.access_token.pk
)
Expand Down
1 change: 0 additions & 1 deletion oauth2_provider/views/oidc.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ def get(self, request, *args, **kwargs):
oauth2_settings.OIDC_RSA_PRIVATE_KEY,
*oauth2_settings.OIDC_RSA_PRIVATE_KEYS_INACTIVE,
]:

key = jwk.JWK.from_pem(pem.encode("utf8"))
data = {"alg": "RS256", "use": "sig", "kid": key.thumbprint()}
data.update(json.loads(key.export_public()))
Expand Down
2 changes: 0 additions & 2 deletions tests/test_oauth2_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ def test_save_bearer_token__without_user__raises_fatal_client(self):
self.validator.save_bearer_token(token, mock.MagicMock())

def test_save_bearer_token__with_existing_tokens__does_not_create_new_tokens(self):

rotate_token_function = mock.MagicMock()
rotate_token_function.return_value = False
self.validator.rotate_refresh_token = rotate_token_function
Expand Down Expand Up @@ -190,7 +189,6 @@ def test_save_bearer_token__with_existing_tokens__does_not_create_new_tokens(sel
self.assertEqual(1, AccessToken.objects.count())

def test_save_bearer_token__checks_to_rotate_tokens(self):

rotate_token_function = mock.MagicMock()
rotate_token_function.return_value = False
self.validator.rotate_refresh_token = rotate_token_function
Expand Down

0 comments on commit 2073168

Please sign in to comment.