Skip to content

Commit

Permalink
Fix cryptography dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Rogos committed Oct 5, 2022
1 parent f42ef3d commit 95a2493
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 9 deletions.
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
exclude: |
(?x)
# NOT INSTALLABLE ADDONS
^auth_jwt/|
^auth_jwt_demo/|
# END NOT INSTALLABLE ADDONS
# Files and folders generated by bots, to avoid loops
Expand Down
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ enable=anomalous-backslash-in-string,
deprecated-module,
file-not-used,
invalid-commit,
missing-manifest-dependency,
#missing-manifest-dependency,
missing-newline-extrafiles,
missing-readme,
no-utf8-coding-comment,
Expand Down
6 changes: 3 additions & 3 deletions auth_jwt/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
"name": "Auth JWT",
"summary": """
JWT bearer token authentication.""",
"version": "14.0.1.2.0",
"version": "15.0.1.0.0",
"license": "LGPL-3",
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
"maintainers": ["sbidoul"],
"website": "https://github.com/OCA/server-auth",
"depends": [],
"external_dependencies": {"python": ["pyjwt", "cryptography"]},
"external_dependencies": {"python": ["pyjwt", "cryptography==36.0.2"]},
"data": ["security/ir.model.access.csv", "views/auth_jwt_validator_views.xml"],
"demo": [],
"installable": False,
"installable": True,
}
4 changes: 2 additions & 2 deletions auth_jwt/models/auth_jwt_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ def _unregister_auth_method(self):
try:
delattr(IrHttp.__class__, f"_auth_method_jwt_{rec.name}")
delattr(IrHttp.__class__, f"_auth_method_public_or_jwt_{rec.name}")
except AttributeError:
pass
except AttributeError as e:
_logger.warning("Attribute error: %s", e)

@api.model_create_multi
def create(self, vals):
Expand Down
2 changes: 1 addition & 1 deletion auth_jwt/views/auth_jwt_validator_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<field name="name">auth.jwt.validator.tree</field>
<field name="model">auth.jwt.validator</field>
<field name="arch" type="xml">
<tree string="arch">
<tree>
<field name="name" />
<field name="issuer" />
<field name="audience" />
Expand Down
2 changes: 1 addition & 1 deletion auth_jwt_demo/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "Auth JWT Test",
"summary": """
Test/demo module for auth_jwt.""",
"version": "14.0.1.2.0",
"version": "15.0.1.0.0",
"license": "LGPL-3",
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
"maintainers": ["sbidoul"],
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# generated from manifests external_dependencies
cryptography==36.0.2
pyjwt
pysaml2
1 change: 1 addition & 0 deletions setup/auth_jwt/odoo/addons/auth_jwt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../../../../auth_jwt
6 changes: 6 additions & 0 deletions setup/auth_jwt/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)

0 comments on commit 95a2493

Please sign in to comment.