mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
[PR #10810/c1e877d2 backport][stable-11] github_app_access_token: fix compatibility import of jwt (#10826)
github_app_access_token: fix compatibility import of jwt (#10810)
Fix compatibility import of jwt.
(cherry picked from commit c1e877d254)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
bugfixes:
|
||||||
|
- "github_app_access_token lookup plugin - fix compatibility imports for using jwt (https://github.com/ansible-collections/community.general/issues/10807, https://github.com/ansible-collections/community.general/pull/10810)."
|
||||||
@@ -77,7 +77,8 @@ except ImportError:
|
|||||||
HAS_PYTHON_JWT = False # vs pyjwt
|
HAS_PYTHON_JWT = False # vs pyjwt
|
||||||
if HAS_JWT and hasattr(jwt, 'JWT'):
|
if HAS_JWT and hasattr(jwt, 'JWT'):
|
||||||
HAS_PYTHON_JWT = True
|
HAS_PYTHON_JWT = True
|
||||||
from jwt import jwk_from_pem, jwt_instance
|
from jwt import jwk_from_pem, JWT
|
||||||
|
jwt_instance = JWT()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from cryptography.hazmat.primitives import serialization
|
from cryptography.hazmat.primitives import serialization
|
||||||
|
|||||||
Reference in New Issue
Block a user