diff --git a/.flake8 b/.flake8 index fde616d..2c97d1d 100644 --- a/.flake8 +++ b/.flake8 @@ -2,11 +2,12 @@ # F401 imported but unused -ignore=F401 +ignore=F401, E722 max-line-length=140 exclude = ./docs ./venv + ./tests migrations diff --git a/.pylintrc b/.pylintrc index d5d1406..e5eab31 100644 --- a/.pylintrc +++ b/.pylintrc @@ -66,7 +66,7 @@ confidence= # --enable=similarities". If you want to run only the classes checker, but have # no Warning level messages displayed, use"--disable=all --enable=classes -disable=C0111, E0611, C0326, R0903, E0402, W0611, C0103, R0201, W0613, W0614, C0411 +disable=C0111, E0611, C0326, R0903, E0402, W0611, C0103, R0201, W0613, W0614, C0411, W0212, W0702, R1705 # C0111 missing-docstring Missing docstring # E0611 no-name-in-module Missing __init__.py # C0326 bad-whitespace Check on flake8. pylint dose not support check use spaces around the = sign when used to indicate a keyword argument or a default parameter value. @@ -76,9 +76,11 @@ disable=C0111, E0611, C0326, R0903, E0402, W0611, C0103, R0201, W0613, W0614, C0 # C0103 invalid-name # R0201 no-self-use # W0613 unused-argument -# C0411 wrong-import-order # W0614 unused-wildcard-import - +# C0411 wrong-import-order +# W0212 protected-access +# W0702 bare-except +# R1705 no-else-return [REPORTS] diff --git a/.travis.yml b/.travis.yml index 9ae677c..8b05754 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,8 +12,9 @@ jobs: include: - stage: test before_script: make install-dev - script: make lint - script: make test + script: + - make lint + - make test - stage: deploy script: skip diff --git a/CHANGES.md b/CHANGES.md index b4e492f..95058de 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,8 +1,9 @@ Changelog ========= -1.0.6 (Mar 30th 2020) +1.0.6 (Apr 27th 2020) ------------------ -- support 'EC' key_type on JWKS +- Support 'EC' key_type on JWKS +- Add logic to failed in get user object from token_info 1.0.5 (Dec 2nd 2019) ------------------ diff --git a/Pipfile.lock b/Pipfile.lock index 608fca1..847b2ab 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "7aeb38fd14c59a7b15a542ce6994bf20d646971ed2ce3f34312ff1ebf960c317" + "sha256": "dd6fbfcb529d65c289178a547be4c6e4eaff934862e11894d405f0ac21404577" }, "pipfile-spec": 6, "requires": { @@ -18,55 +18,50 @@ "default": { "asn1crypto": { "hashes": [ - "sha256:7bb1cc02a5620b3d72da4ba070bda2f44f0e61b44dee910a302eddff802b6fb5", - "sha256:87620880a477123e01177a1f73d0f327210b43a3cdbd714efcd2fa49a8d7b384" + "sha256:5a215cb8dc12f892244e3a113fe05397ee23c5c4ca7a69cd6e69811755efc42d", + "sha256:831d2710d3274c8a74befdddaf9f17fcbf6e350534565074818722d6d615b315" ], - "version": "==1.2.0" + "version": "==1.3.0" }, "certifi": { "hashes": [ - "sha256:017c25db2a153ce562900032d5bc68e9f191e44e9a0f762f373977de9df1fbb3", - "sha256:25b64c7da4cd7479594d035c08c2d809eb4aab3a26e5a990ea98cc450c320f1f" + "sha256:1d987a998c75633c40847cc966fcf5904906c920a7f17ef374f5aa4282abd304", + "sha256:51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519" ], - "version": "==2019.11.28" + "version": "==2020.4.5.1" }, "cffi": { "hashes": [ - "sha256:0b49274afc941c626b605fb59b59c3485c17dc776dc3cc7cc14aca74cc19cc42", - "sha256:0e3ea92942cb1168e38c05c1d56b0527ce31f1a370f6117f1d490b8dcd6b3a04", - "sha256:135f69aecbf4517d5b3d6429207b2dff49c876be724ac0c8bf8e1ea99df3d7e5", - "sha256:19db0cdd6e516f13329cba4903368bff9bb5a9331d3410b1b448daaadc495e54", - "sha256:2781e9ad0e9d47173c0093321bb5435a9dfae0ed6a762aabafa13108f5f7b2ba", - "sha256:291f7c42e21d72144bb1c1b2e825ec60f46d0a7468f5346841860454c7aa8f57", - "sha256:2c5e309ec482556397cb21ede0350c5e82f0eb2621de04b2633588d118da4396", - "sha256:2e9c80a8c3344a92cb04661115898a9129c074f7ab82011ef4b612f645939f12", - "sha256:32a262e2b90ffcfdd97c7a5e24a6012a43c61f1f5a57789ad80af1d26c6acd97", - "sha256:3c9fff570f13480b201e9ab69453108f6d98244a7f495e91b6c654a47486ba43", - "sha256:415bdc7ca8c1c634a6d7163d43fb0ea885a07e9618a64bda407e04b04333b7db", - "sha256:42194f54c11abc8583417a7cf4eaff544ce0de8187abaf5d29029c91b1725ad3", - "sha256:4424e42199e86b21fc4db83bd76909a6fc2a2aefb352cb5414833c030f6ed71b", - "sha256:4a43c91840bda5f55249413037b7a9b79c90b1184ed504883b72c4df70778579", - "sha256:599a1e8ff057ac530c9ad1778293c665cb81a791421f46922d80a86473c13346", - "sha256:5c4fae4e9cdd18c82ba3a134be256e98dc0596af1e7285a3d2602c97dcfa5159", - "sha256:5ecfa867dea6fabe2a58f03ac9186ea64da1386af2159196da51c4904e11d652", - "sha256:62f2578358d3a92e4ab2d830cd1c2049c9c0d0e6d3c58322993cc341bdeac22e", - "sha256:6471a82d5abea994e38d2c2abc77164b4f7fbaaf80261cb98394d5793f11b12a", - "sha256:6d4f18483d040e18546108eb13b1dfa1000a089bcf8529e30346116ea6240506", - "sha256:71a608532ab3bd26223c8d841dde43f3516aa5d2bf37b50ac410bb5e99053e8f", - "sha256:74a1d8c85fb6ff0b30fbfa8ad0ac23cd601a138f7509dc617ebc65ef305bb98d", - "sha256:7b93a885bb13073afb0aa73ad82059a4c41f4b7d8eb8368980448b52d4c7dc2c", - "sha256:7d4751da932caaec419d514eaa4215eaf14b612cff66398dd51129ac22680b20", - "sha256:7f627141a26b551bdebbc4855c1157feeef18241b4b8366ed22a5c7d672ef858", - "sha256:8169cf44dd8f9071b2b9248c35fc35e8677451c52f795daa2bb4643f32a540bc", - "sha256:aa00d66c0fab27373ae44ae26a66a9e43ff2a678bf63a9c7c1a9a4d61172827a", - "sha256:ccb032fda0873254380aa2bfad2582aedc2959186cce61e3a17abc1a55ff89c3", - "sha256:d754f39e0d1603b5b24a7f8484b22d2904fa551fe865fd0d4c3332f078d20d4e", - "sha256:d75c461e20e29afc0aee7172a0950157c704ff0dd51613506bd7d82b718e7410", - "sha256:dcd65317dd15bc0451f3e01c80da2216a31916bdcffd6221ca1202d96584aa25", - "sha256:e570d3ab32e2c2861c4ebe6ffcad6a8abf9347432a37608fe1fbd157b3f0036b", - "sha256:fd43a88e045cf992ed09fa724b5315b790525f2676883a6ea64e3263bae6549d" - ], - "version": "==1.13.2" + "sha256:001bf3242a1bb04d985d63e138230802c6c8d4db3668fb545fb5005ddf5bb5ff", + "sha256:00789914be39dffba161cfc5be31b55775de5ba2235fe49aa28c148236c4e06b", + "sha256:028a579fc9aed3af38f4892bdcc7390508adabc30c6af4a6e4f611b0c680e6ac", + "sha256:14491a910663bf9f13ddf2bc8f60562d6bc5315c1f09c704937ef17293fb85b0", + "sha256:1cae98a7054b5c9391eb3249b86e0e99ab1e02bb0cc0575da191aedadbdf4384", + "sha256:2089ed025da3919d2e75a4d963d008330c96751127dd6f73c8dc0c65041b4c26", + "sha256:2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6", + "sha256:337d448e5a725bba2d8293c48d9353fc68d0e9e4088d62a9571def317797522b", + "sha256:399aed636c7d3749bbed55bc907c3288cb43c65c4389964ad5ff849b6370603e", + "sha256:3b911c2dbd4f423b4c4fcca138cadde747abdb20d196c4a48708b8a2d32b16dd", + "sha256:3d311bcc4a41408cf5854f06ef2c5cab88f9fded37a3b95936c9879c1640d4c2", + "sha256:62ae9af2d069ea2698bf536dcfe1e4eed9090211dbaafeeedf5cb6c41b352f66", + "sha256:66e41db66b47d0d8672d8ed2708ba91b2f2524ece3dee48b5dfb36be8c2f21dc", + "sha256:675686925a9fb403edba0114db74e741d8181683dcf216be697d208857e04ca8", + "sha256:7e63cbcf2429a8dbfe48dcc2322d5f2220b77b2e17b7ba023d6166d84655da55", + "sha256:8a6c688fefb4e1cd56feb6c511984a6c4f7ec7d2a1ff31a10254f3c817054ae4", + "sha256:8c0ffc886aea5df6a1762d0019e9cb05f825d0eec1f520c51be9d198701daee5", + "sha256:95cd16d3dee553f882540c1ffe331d085c9e629499ceadfbda4d4fde635f4b7d", + "sha256:99f748a7e71ff382613b4e1acc0ac83bf7ad167fb3802e35e90d9763daba4d78", + "sha256:b8c78301cefcf5fd914aad35d3c04c2b21ce8629b5e4f4e45ae6812e461910fa", + "sha256:c420917b188a5582a56d8b93bdd8e0f6eca08c84ff623a4c16e809152cd35793", + "sha256:c43866529f2f06fe0edc6246eb4faa34f03fe88b64a0a9a942561c8e22f4b71f", + "sha256:cab50b8c2250b46fe738c77dbd25ce017d5e6fb35d3407606e7a4180656a5a6a", + "sha256:cef128cb4d5e0b3493f058f10ce32365972c554572ff821e175dbc6f8ff6924f", + "sha256:cf16e3cf6c0a5fdd9bc10c21687e19d29ad1fe863372b5543deaec1039581a30", + "sha256:e56c744aa6ff427a607763346e4170629caf7e48ead6921745986db3692f987f", + "sha256:e577934fc5f8779c554639376beeaa5657d54349096ef24abe8c74c5d9c117c3", + "sha256:f2b0fa0c01d8a0c7483afd9f31d7ecf2d71760ca24499c8697aeb5ca37dc090c" + ], + "version": "==1.14.0" }, "chardet": { "hashes": [ @@ -125,9 +120,10 @@ }, "pycparser": { "hashes": [ - "sha256:a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3" + "sha256:2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0", + "sha256:7582ad22678f0fcd81102833f60ef8d0e57288b6b5fb00323d101be910e35705" ], - "version": "==2.19" + "version": "==2.20" }, "pyjwt": { "hashes": [ @@ -154,17 +150,17 @@ }, "six": { "hashes": [ - "sha256:1f1b7d42e254082a9db6279deae68afb421ceba6158efa6131de7b3003ee93fd", - "sha256:30f610279e8b2578cab6db20741130331735c781b56053c59c4076da27f06b66" + "sha256:236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a", + "sha256:8f3cd2e254d8f793e7f3d6d9df77b92252b52637291d0f0da013c76ea2724b6c" ], - "version": "==1.13.0" + "version": "==1.14.0" }, "sqlparse": { "hashes": [ - "sha256:40afe6b8d4b1117e7dff5504d7a8ce07d9a1b15aeeade8a2d10f130a834f8177", - "sha256:7c3dca29c022744e95b547e867cee89f4fce4373f3549ccd8797d8eb52cdb873" + "sha256:022fb9c87b524d1f7862b3037e541f68597a730a8843245c349fc93e1643dc4e", + "sha256:e162203737712307dfe78860cc56c8da8a852ab2ee33750e33aeadf38d12c548" ], - "version": "==0.3.0" + "version": "==0.3.1" }, "urllib3": { "hashes": [ @@ -184,10 +180,10 @@ }, "certifi": { "hashes": [ - "sha256:017c25db2a153ce562900032d5bc68e9f191e44e9a0f762f373977de9df1fbb3", - "sha256:25b64c7da4cd7479594d035c08c2d809eb4aab3a26e5a990ea98cc450c320f1f" + "sha256:1d987a998c75633c40847cc966fcf5904906c920a7f17ef374f5aa4282abd304", + "sha256:51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519" ], - "version": "==2019.11.28" + "version": "==2020.4.5.1" }, "chardet": { "hashes": [ @@ -298,36 +294,37 @@ }, "six": { "hashes": [ - "sha256:1f1b7d42e254082a9db6279deae68afb421ceba6158efa6131de7b3003ee93fd", - "sha256:30f610279e8b2578cab6db20741130331735c781b56053c59c4076da27f06b66" + "sha256:236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a", + "sha256:8f3cd2e254d8f793e7f3d6d9df77b92252b52637291d0f0da013c76ea2724b6c" ], - "version": "==1.13.0" + "version": "==1.14.0" }, "typed-ast": { "hashes": [ - "sha256:1170afa46a3799e18b4c977777ce137bb53c7485379d9706af8a59f2ea1aa161", - "sha256:18511a0b3e7922276346bcb47e2ef9f38fb90fd31cb9223eed42c85d1312344e", - "sha256:262c247a82d005e43b5b7f69aff746370538e176131c32dda9cb0f324d27141e", - "sha256:2b907eb046d049bcd9892e3076c7a6456c93a25bebfe554e931620c90e6a25b0", - "sha256:354c16e5babd09f5cb0ee000d54cfa38401d8b8891eefa878ac772f827181a3c", - "sha256:48e5b1e71f25cfdef98b013263a88d7145879fbb2d5185f2a0c79fa7ebbeae47", - "sha256:4e0b70c6fc4d010f8107726af5fd37921b666f5b31d9331f0bd24ad9a088e631", - "sha256:630968c5cdee51a11c05a30453f8cd65e0cc1d2ad0d9192819df9978984529f4", - "sha256:66480f95b8167c9c5c5c87f32cf437d585937970f3fc24386f313a4c97b44e34", - "sha256:71211d26ffd12d63a83e079ff258ac9d56a1376a25bc80b1cdcdf601b855b90b", - "sha256:7954560051331d003b4e2b3eb822d9dd2e376fa4f6d98fee32f452f52dd6ebb2", - "sha256:838997f4310012cf2e1ad3803bce2f3402e9ffb71ded61b5ee22617b3a7f6b6e", - "sha256:95bd11af7eafc16e829af2d3df510cecfd4387f6453355188342c3e79a2ec87a", - "sha256:bc6c7d3fa1325a0c6613512a093bc2a2a15aeec350451cbdf9e1d4bffe3e3233", - "sha256:cc34a6f5b426748a507dd5d1de4c1978f2eb5626d51326e43280941206c209e1", - "sha256:d755f03c1e4a51e9b24d899561fec4ccaf51f210d52abdf8c07ee2849b212a36", - "sha256:d7c45933b1bdfaf9f36c579671fec15d25b06c8398f113dab64c18ed1adda01d", - "sha256:d896919306dd0aa22d0132f62a1b78d11aaf4c9fc5b3410d3c666b818191630a", - "sha256:fdc1c9bbf79510b76408840e009ed65958feba92a88833cdceecff93ae8fff66", - "sha256:ffde2fbfad571af120fcbfbbc61c72469e72f550d676c3342492a9dfdefb8f12" + "sha256:0666aa36131496aed8f7be0410ff974562ab7eeac11ef351def9ea6fa28f6355", + "sha256:0c2c07682d61a629b68433afb159376e24e5b2fd4641d35424e462169c0a7919", + "sha256:249862707802d40f7f29f6e1aad8d84b5aa9e44552d2cc17384b209f091276aa", + "sha256:24995c843eb0ad11a4527b026b4dde3da70e1f2d8806c99b7b4a7cf491612652", + "sha256:269151951236b0f9a6f04015a9004084a5ab0d5f19b57de779f908621e7d8b75", + "sha256:4083861b0aa07990b619bd7ddc365eb7fa4b817e99cf5f8d9cf21a42780f6e01", + "sha256:498b0f36cc7054c1fead3d7fc59d2150f4d5c6c56ba7fb150c013fbc683a8d2d", + "sha256:4e3e5da80ccbebfff202a67bf900d081906c358ccc3d5e3c8aea42fdfdfd51c1", + "sha256:6daac9731f172c2a22ade6ed0c00197ee7cc1221aa84cfdf9c31defeb059a907", + "sha256:715ff2f2df46121071622063fc7543d9b1fd19ebfc4f5c8895af64a77a8c852c", + "sha256:73d785a950fc82dd2a25897d525d003f6378d1cb23ab305578394694202a58c3", + "sha256:8c8aaad94455178e3187ab22c8b01a3837f8ee50e09cf31f1ba129eb293ec30b", + "sha256:8ce678dbaf790dbdb3eba24056d5364fb45944f33553dd5869b7580cdbb83614", + "sha256:aaee9905aee35ba5905cfb3c62f3e83b3bec7b39413f0a7f19be4e547ea01ebb", + "sha256:bcd3b13b56ea479b3650b82cabd6b5343a625b0ced5429e4ccad28a8973f301b", + "sha256:c9e348e02e4d2b4a8b2eedb48210430658df6951fa484e59de33ff773fbd4b41", + "sha256:d205b1b46085271b4e15f670058ce182bd1199e56b317bf2ec004b6a44f911f6", + "sha256:d43943ef777f9a1c42bf4e552ba23ac77a6351de620aa9acf64ad54933ad4d34", + "sha256:d5d33e9e7af3b34a40dc05f498939f0ebf187f07c385fd58d591c533ad8562fe", + "sha256:fc0fea399acb12edbf8a628ba8d2312f583bdbdb3335635db062fa98cf71fca4", + "sha256:fe460b922ec15dd205595c9b5b99e2f056fd98ae8f9f56b888e7a17dc2b757e7" ], "markers": "implementation_name == 'cpython' and python_version < '3.8'", - "version": "==1.4.0" + "version": "==1.4.1" }, "urllib3": { "hashes": [ diff --git a/ridi_django_oauth2/decorators.py b/ridi_django_oauth2/decorators.py index 5df70a1..d4b960f 100644 --- a/ridi_django_oauth2/decorators.py +++ b/ridi_django_oauth2/decorators.py @@ -8,7 +8,7 @@ RESPONSE_HANDLER_TYPE = typing.Optional[typing.Callable] -def login_required(response_handler: RESPONSE_HANDLER_TYPE=None): +def login_required(response_handler: RESPONSE_HANDLER_TYPE = None): def decorator(func): def wrapper(self, request, *args, **kwargs): user = request.user @@ -25,7 +25,7 @@ def wrapper(self, request, *args, **kwargs): return decorator -def scope_required(required_scopes: typing.List, response_handler: RESPONSE_HANDLER_TYPE=None): +def scope_required(required_scopes: typing.List, response_handler: RESPONSE_HANDLER_TYPE = None): def decorator(func): def wrapper(self, request, *args, **kwargs): token_info = request.user.token_info diff --git a/ridi_django_oauth2/middlewares.py b/ridi_django_oauth2/middlewares.py index bfec056..4cd8702 100644 --- a/ridi_django_oauth2/middlewares.py +++ b/ridi_django_oauth2/middlewares.py @@ -23,14 +23,16 @@ def process_request(self, request): return HttpUnauthorizedResponse() if token_info is not None: - self._set_user_in_request(request, token_info, token) + try: + self._set_user_in_request(request, token_info, token) + except: + return HttpUnauthorizedResponse() return None @staticmethod def _set_user_in_request(request, token_info: AccessTokenInfo, token: TokenData): get_user_from_token_info = RidiOAuth2Config.get_user_from_token_info_callable() - if get_user_from_token_info: user = get_user_from_token_info(token_info) diff --git a/ridi_oauth2/client/grant.py b/ridi_oauth2/client/grant.py index eb176af..e7ae1a8 100644 --- a/ridi_oauth2/client/grant.py +++ b/ridi_oauth2/client/grant.py @@ -57,7 +57,7 @@ def _request_token(self, data: typing.Dict) -> TokenData: ) @classmethod - def _request(cls, method: str, url: str, data: typing.Dict, headers: typing.Dict=None) -> TokenData: + def _request(cls, method: str, url: str, data: typing.Dict, headers: typing.Dict = None) -> TokenData: try: response = requests.request(method=method, url=url, data=data, headers=headers) response.raise_for_status() diff --git a/ridi_oauth2/introspector/base.py b/ridi_oauth2/introspector/base.py index 5e9c924..a3a0af2 100644 --- a/ridi_oauth2/introspector/base.py +++ b/ridi_oauth2/introspector/base.py @@ -2,7 +2,7 @@ class BaseIntrospector: - def __init__(self, access_token: str, token_type_hint: str=None): + def __init__(self, access_token: str, token_type_hint: str = None): self._access_token = access_token self._token_type_hint = token_type_hint diff --git a/ridi_oauth2/introspector/exceptions.py b/ridi_oauth2/introspector/exceptions.py index 0a02611..a50395a 100644 --- a/ridi_oauth2/introspector/exceptions.py +++ b/ridi_oauth2/introspector/exceptions.py @@ -28,11 +28,3 @@ class NotExistedKey(PublicKeyException): class PublicRequestException(PublicKeyException): pass - - -class AccountServerException(PublicRequestException): - pass - - -class ClientRequestException(PublicRequestException): - pass diff --git a/ridi_oauth2/introspector/key_handler.py b/ridi_oauth2/introspector/key_handler.py index 7d1841c..4e98ce9 100644 --- a/ridi_oauth2/introspector/key_handler.py +++ b/ridi_oauth2/introspector/key_handler.py @@ -1,13 +1,13 @@ from typing import Dict, List import requests -from requests import RequestException, Response +from requests import Response, HTTPError from ridi_django_oauth2.config import RidiOAuth2Config from ridi_django_oauth2_lib.decorators.retry import RetryFailException, retry from ridi_oauth2.introspector.constants import JWKKeyType, JWKUse from ridi_oauth2.introspector.dtos import BaseJWKDto -from ridi_oauth2.introspector.exceptions import AccountServerException, ClientRequestException, FailToLoadPublicKeyException, \ +from ridi_oauth2.introspector.exceptions import FailToLoadPublicKeyException, \ InvalidPublicKey, NotExistedKey from ridi_oauth2.introspector.factories import JWKDtoFactory @@ -58,14 +58,11 @@ def _memorize_key_dtos(cls, client_id: str, keys: List[BaseJWKDto]): @staticmethod def _process_response(response: Response) -> Dict: - if response.status_code >= 500: - raise AccountServerException - elif response.status_code >= 400: - raise ClientRequestException + response.raise_for_status() return response.json() @classmethod - @retry(retry_count=3, retriable_exceptions=(RequestException, AccountServerException,)) + @retry(retry_count=3, retriable_exceptions=(HTTPError, )) def _get_valid_public_keys_by_client_id(cls, client_id: str) -> List[BaseJWKDto]: response = requests.request( method='GET', diff --git a/setup.py b/setup.py index 87b88e3..1beb545 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import find_packages, setup -version = '1.0.5' +version = '1.0.6' # When the project is installed by pip, this is the specification that is used to install its dependencies. install_requires = [ diff --git a/tests/tests_ridi_django_oauth2/test_token_util.py b/tests/tests_ridi_django_oauth2/test_token_util.py index b417da1..fb07b56 100644 --- a/tests/tests_ridi_django_oauth2/test_token_util.py +++ b/tests/tests_ridi_django_oauth2/test_token_util.py @@ -17,8 +17,8 @@ def generate_ec_private_key(): return ec.generate_private_key( - curve=ec.SECP256R1, - backend=default_backend() + curve=ec.SECP256R1, + backend=default_backend() )