Skip to content

Commit b71db9b

Browse files
committed
[16.0][ADD] auth_jwt_server_env
1 parent df10688 commit b71db9b

File tree

10 files changed

+540
-0
lines changed

10 files changed

+540
-0
lines changed

Diff for: auth_jwt_server_env/README.rst

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
===================
2+
Auth Jwt Server Env
3+
===================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:072faa621b2eaef52b24e0b50a9751d3a118c4b1326822d34e9593dd44be4ae4
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Beta
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--auth-lightgray.png?logo=github
20+
:target: https://github.com/OCA/server-auth/tree/16.0/auth_jwt_server_env
21+
:alt: OCA/server-auth
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/server-auth-16-0/server-auth-16-0-auth_jwt_server_env
24+
:alt: Translate me on Weblate
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-auth&target_branch=16.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
Configure ``jwt`` authentication method via server env.
32+
33+
**Table of contents**
34+
35+
.. contents::
36+
:local:
37+
38+
Bug Tracker
39+
===========
40+
41+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-auth/issues>`_.
42+
In case of trouble, please check there if your issue has already been reported.
43+
If you spotted it first, help us to smash it by providing a detailed and welcomed
44+
`feedback <https://github.com/OCA/server-auth/issues/new?body=module:%20auth_jwt_server_env%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
45+
46+
Do not contact contributors directly about support or help with technical issues.
47+
48+
Credits
49+
=======
50+
51+
Authors
52+
~~~~~~~
53+
54+
* ACSONE SA/NV
55+
56+
Contributors
57+
~~~~~~~~~~~~
58+
59+
* Souheil Bejaoui <[email protected]>
60+
61+
Maintainers
62+
~~~~~~~~~~~
63+
64+
This module is maintained by the OCA.
65+
66+
.. image:: https://odoo-community.org/logo.png
67+
:alt: Odoo Community Association
68+
:target: https://odoo-community.org
69+
70+
OCA, or the Odoo Community Association, is a nonprofit organization whose
71+
mission is to support the collaborative development of Odoo features and
72+
promote its widespread use.
73+
74+
This module is part of the `OCA/server-auth <https://github.com/OCA/server-auth/tree/16.0/auth_jwt_server_env>`_ project on GitHub.
75+
76+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

Diff for: auth_jwt_server_env/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models

Diff for: auth_jwt_server_env/__manifest__.py

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright 2023 ACSONE SA/NV
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
4+
{
5+
"name": "Auth Jwt Server Env",
6+
"summary": """This addon adds auth.jwt.validator fields to server env""",
7+
"version": "16.0.1.0.0",
8+
"license": "AGPL-3",
9+
"author": "ACSONE SA/NV, Odoo Community Association (OCA)",
10+
"website": "https://github.com/OCA/server-auth",
11+
"depends": ["server_environment", "auth_jwt"],
12+
"data": [],
13+
"demo": [],
14+
}

Diff for: auth_jwt_server_env/models/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import auth_jwt_validator

Diff for: auth_jwt_server_env/models/auth_jwt_validator.py

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Copyright 2023 ACSONE SA/NV
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
4+
from odoo import models
5+
6+
7+
class AuthJwtValidator(models.Model):
8+
9+
_name = "auth.jwt.validator"
10+
_inherit = ["auth.jwt.validator", "server.env.mixin"]
11+
12+
@property
13+
def _server_env_fields(self):
14+
env_fields = super()._server_env_fields
15+
env_fields.update(
16+
{"secret_key": {}, "audience": {}, "issuer": {}, "public_key_jwk_uri": {}}
17+
)
18+
return env_fields

Diff for: auth_jwt_server_env/readme/CONTRIBUTORS.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* Souheil Bejaoui <[email protected]>

Diff for: auth_jwt_server_env/readme/DESCRIPTION.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Configure ``jwt`` authentication method via server env.

0 commit comments

Comments
 (0)