Skip to content

Commit a5830da

Browse files
committed
[MIG] auth_oidc: Migration to 19.0
1 parent dac94fd commit a5830da

File tree

7 files changed

+76
-46
lines changed

7 files changed

+76
-46
lines changed

auth_oidc/README.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,11 @@ Known issues / Roadmap
147147
Changelog
148148
=========
149149

150+
19.0.1.0.0 2025-10-01
151+
---------------------
152+
153+
- Odoo 19 migration
154+
150155
18.0.1.0.0 2024-10-09
151156
---------------------
152157

auth_oidc/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
{
66
"name": "Authentication OpenID Connect",
7-
"version": "18.0.1.0.0",
7+
"version": "19.0.1.0.0",
88
"license": "AGPL-3",
99
"author": (
1010
"ICTSTUDIO, André Schenkels, ACSONE SA/NV, Odoo Community Association (OCA)"

auth_oidc/demo/local_keycloak.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<record id="local_keycloak" model="auth.oauth.provider">
33
<field name="name">keycloak:8080 on localhost</field>
44
<field name="flow">id_token_code</field>
5-
<field name="client_id">auth_oidc-test</field>
5+
<field name="client_id">auth_oidc-keycloak</field>
66
<field name="token_map">preferred_username:user_id</field>
77
<field name="body">keycloak:8080 on localhost</field>
88
<field name="enabled" eval="True" />

auth_oidc/readme/HISTORY.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 19.0.1.0.0 2025-10-01
2+
3+
- Odoo 19 migration
4+
15
## 18.0.1.0.0 2024-10-09
26

37
- Odoo 18 migration

auth_oidc/static/description/index.html

Lines changed: 46 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -391,23 +391,24 @@ <h1>Authentication OpenID Connect</h1>
391391
<li><a class="reference internal" href="#usage" id="toc-entry-5">Usage</a></li>
392392
<li><a class="reference internal" href="#known-issues-roadmap" id="toc-entry-6">Known issues / Roadmap</a></li>
393393
<li><a class="reference internal" href="#changelog" id="toc-entry-7">Changelog</a><ul>
394-
<li><a class="reference internal" href="#section-1" id="toc-entry-8">18.0.1.0.0 2024-10-09</a></li>
395-
<li><a class="reference internal" href="#section-2" id="toc-entry-9">17.0.1.0.0 2024-03-20</a></li>
396-
<li><a class="reference internal" href="#section-3" id="toc-entry-10">16.0.1.1.0 2024-02-28</a></li>
397-
<li><a class="reference internal" href="#section-4" id="toc-entry-11">16.0.1.0.2 2023-11-16</a></li>
398-
<li><a class="reference internal" href="#section-5" id="toc-entry-12">16.0.1.0.1 2023-10-09</a></li>
399-
<li><a class="reference internal" href="#section-6" id="toc-entry-13">16.0.1.0.0 2023-01-27</a></li>
400-
<li><a class="reference internal" href="#section-7" id="toc-entry-14">15.0.1.0.0 2023-01-06</a></li>
401-
<li><a class="reference internal" href="#section-8" id="toc-entry-15">14.0.1.0.0 2021-12-10</a></li>
402-
<li><a class="reference internal" href="#section-9" id="toc-entry-16">13.0.1.0.0 2020-04-10</a></li>
403-
<li><a class="reference internal" href="#section-10" id="toc-entry-17">10.0.1.0.0 2018-10-05</a></li>
394+
<li><a class="reference internal" href="#section-1" id="toc-entry-8">19.0.1.0.0 2025-10-01</a></li>
395+
<li><a class="reference internal" href="#section-2" id="toc-entry-9">18.0.1.0.0 2024-10-09</a></li>
396+
<li><a class="reference internal" href="#section-3" id="toc-entry-10">17.0.1.0.0 2024-03-20</a></li>
397+
<li><a class="reference internal" href="#section-4" id="toc-entry-11">16.0.1.1.0 2024-02-28</a></li>
398+
<li><a class="reference internal" href="#section-5" id="toc-entry-12">16.0.1.0.2 2023-11-16</a></li>
399+
<li><a class="reference internal" href="#section-6" id="toc-entry-13">16.0.1.0.1 2023-10-09</a></li>
400+
<li><a class="reference internal" href="#section-7" id="toc-entry-14">16.0.1.0.0 2023-01-27</a></li>
401+
<li><a class="reference internal" href="#section-8" id="toc-entry-15">15.0.1.0.0 2023-01-06</a></li>
402+
<li><a class="reference internal" href="#section-9" id="toc-entry-16">14.0.1.0.0 2021-12-10</a></li>
403+
<li><a class="reference internal" href="#section-10" id="toc-entry-17">13.0.1.0.0 2020-04-10</a></li>
404+
<li><a class="reference internal" href="#section-11" id="toc-entry-18">10.0.1.0.0 2018-10-05</a></li>
404405
</ul>
405406
</li>
406-
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-18">Bug Tracker</a></li>
407-
<li><a class="reference internal" href="#credits" id="toc-entry-19">Credits</a><ul>
408-
<li><a class="reference internal" href="#authors" id="toc-entry-20">Authors</a></li>
409-
<li><a class="reference internal" href="#contributors" id="toc-entry-21">Contributors</a></li>
410-
<li><a class="reference internal" href="#maintainers" id="toc-entry-22">Maintainers</a></li>
407+
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-19">Bug Tracker</a></li>
408+
<li><a class="reference internal" href="#credits" id="toc-entry-20">Credits</a><ul>
409+
<li><a class="reference internal" href="#authors" id="toc-entry-21">Authors</a></li>
410+
<li><a class="reference internal" href="#contributors" id="toc-entry-22">Contributors</a></li>
411+
<li><a class="reference internal" href="#maintainers" id="toc-entry-23">Maintainers</a></li>
411412
</ul>
412413
</li>
413414
</ul>
@@ -505,86 +506,92 @@ <h2><a class="toc-backref" href="#toc-entry-6">Known issues / Roadmap</a></h2>
505506
<div class="section" id="changelog">
506507
<h2><a class="toc-backref" href="#toc-entry-7">Changelog</a></h2>
507508
<div class="section" id="section-1">
508-
<h3><a class="toc-backref" href="#toc-entry-8">18.0.1.0.0 2024-10-09</a></h3>
509+
<h3><a class="toc-backref" href="#toc-entry-8">19.0.1.0.0 2025-10-01</a></h3>
509510
<ul class="simple">
510-
<li>Odoo 18 migration</li>
511+
<li>Odoo 19 migration</li>
511512
</ul>
512513
</div>
513514
<div class="section" id="section-2">
514-
<h3><a class="toc-backref" href="#toc-entry-9">17.0.1.0.0 2024-03-20</a></h3>
515+
<h3><a class="toc-backref" href="#toc-entry-9">18.0.1.0.0 2024-10-09</a></h3>
515516
<ul class="simple">
516-
<li>Odoo 17 migration</li>
517+
<li>Odoo 18 migration</li>
517518
</ul>
518519
</div>
519520
<div class="section" id="section-3">
520-
<h3><a class="toc-backref" href="#toc-entry-10">16.0.1.1.0 2024-02-28</a></h3>
521+
<h3><a class="toc-backref" href="#toc-entry-10">17.0.1.0.0 2024-03-20</a></h3>
521522
<ul class="simple">
522-
<li>Forward port OpenID Connect fixes from 15.0 to 16.0</li>
523+
<li>Odoo 17 migration</li>
523524
</ul>
524525
</div>
525526
<div class="section" id="section-4">
526-
<h3><a class="toc-backref" href="#toc-entry-11">16.0.1.0.2 2023-11-16</a></h3>
527+
<h3><a class="toc-backref" href="#toc-entry-11">16.0.1.1.0 2024-02-28</a></h3>
527528
<ul class="simple">
528-
<li>Readme link updates</li>
529+
<li>Forward port OpenID Connect fixes from 15.0 to 16.0</li>
529530
</ul>
530531
</div>
531532
<div class="section" id="section-5">
532-
<h3><a class="toc-backref" href="#toc-entry-12">16.0.1.0.1 2023-10-09</a></h3>
533+
<h3><a class="toc-backref" href="#toc-entry-12">16.0.1.0.2 2023-11-16</a></h3>
533534
<ul class="simple">
534-
<li>Add AzureAD code flow provider</li>
535+
<li>Readme link updates</li>
535536
</ul>
536537
</div>
537538
<div class="section" id="section-6">
538-
<h3><a class="toc-backref" href="#toc-entry-13">16.0.1.0.0 2023-01-27</a></h3>
539+
<h3><a class="toc-backref" href="#toc-entry-13">16.0.1.0.1 2023-10-09</a></h3>
539540
<ul class="simple">
540-
<li>Odoo 16 migration</li>
541+
<li>Add AzureAD code flow provider</li>
541542
</ul>
542543
</div>
543544
<div class="section" id="section-7">
544-
<h3><a class="toc-backref" href="#toc-entry-14">15.0.1.0.0 2023-01-06</a></h3>
545+
<h3><a class="toc-backref" href="#toc-entry-14">16.0.1.0.0 2023-01-27</a></h3>
545546
<ul class="simple">
546-
<li>Odoo 15 migration</li>
547+
<li>Odoo 16 migration</li>
547548
</ul>
548549
</div>
549550
<div class="section" id="section-8">
550-
<h3><a class="toc-backref" href="#toc-entry-15">14.0.1.0.0 2021-12-10</a></h3>
551+
<h3><a class="toc-backref" href="#toc-entry-15">15.0.1.0.0 2023-01-06</a></h3>
551552
<ul class="simple">
552-
<li>Odoo 14 migration</li>
553+
<li>Odoo 15 migration</li>
553554
</ul>
554555
</div>
555556
<div class="section" id="section-9">
556-
<h3><a class="toc-backref" href="#toc-entry-16">13.0.1.0.0 2020-04-10</a></h3>
557+
<h3><a class="toc-backref" href="#toc-entry-16">14.0.1.0.0 2021-12-10</a></h3>
557558
<ul class="simple">
558-
<li>Odoo 13 migration, add authorization code flow.</li>
559+
<li>Odoo 14 migration</li>
559560
</ul>
560561
</div>
561562
<div class="section" id="section-10">
562-
<h3><a class="toc-backref" href="#toc-entry-17">10.0.1.0.0 2018-10-05</a></h3>
563+
<h3><a class="toc-backref" href="#toc-entry-17">13.0.1.0.0 2020-04-10</a></h3>
564+
<ul class="simple">
565+
<li>Odoo 13 migration, add authorization code flow.</li>
566+
</ul>
567+
</div>
568+
<div class="section" id="section-11">
569+
<h3><a class="toc-backref" href="#toc-entry-18">10.0.1.0.0 2018-10-05</a></h3>
563570
<ul class="simple">
564571
<li>Initial implementation</li>
565572
</ul>
566573
</div>
567574
</div>
568575
<div class="section" id="bug-tracker">
569-
<h2><a class="toc-backref" href="#toc-entry-18">Bug Tracker</a></h2>
576+
<h2><a class="toc-backref" href="#toc-entry-19">Bug Tracker</a></h2>
570577
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/server-auth/issues">GitHub Issues</a>.
571578
In case of trouble, please check there if your issue has already been reported.
572579
If you spotted it first, help us to smash it by providing a detailed and welcomed
573580
<a class="reference external" href="https://github.com/OCA/server-auth/issues/new?body=module:%20auth_oidc%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
574581
<p>Do not contact contributors directly about support or help with technical issues.</p>
575582
</div>
576583
<div class="section" id="credits">
577-
<h2><a class="toc-backref" href="#toc-entry-19">Credits</a></h2>
584+
<h2><a class="toc-backref" href="#toc-entry-20">Credits</a></h2>
578585
<div class="section" id="authors">
579-
<h3><a class="toc-backref" href="#toc-entry-20">Authors</a></h3>
586+
<h3><a class="toc-backref" href="#toc-entry-21">Authors</a></h3>
580587
<ul class="simple">
581588
<li>ICTSTUDIO</li>
582589
<li>André Schenkels</li>
583590
<li>ACSONE SA/NV</li>
584591
</ul>
585592
</div>
586593
<div class="section" id="contributors">
587-
<h3><a class="toc-backref" href="#toc-entry-21">Contributors</a></h3>
594+
<h3><a class="toc-backref" href="#toc-entry-22">Contributors</a></h3>
588595
<ul class="simple">
589596
<li>Alexandre Fayolle &lt;<a class="reference external" href="mailto:alexandre.fayolle&#64;camptocamp.com">alexandre.fayolle&#64;camptocamp.com</a>&gt;</li>
590597
<li>Stéphane Bidoul &lt;<a class="reference external" href="mailto:stephane.bidoul&#64;acsone.eu">stephane.bidoul&#64;acsone.eu</a>&gt;</li>
@@ -593,7 +600,7 @@ <h3><a class="toc-backref" href="#toc-entry-21">Contributors</a></h3>
593600
</ul>
594601
</div>
595602
<div class="section" id="maintainers">
596-
<h3><a class="toc-backref" href="#toc-entry-22">Maintainers</a></h3>
603+
<h3><a class="toc-backref" href="#toc-entry-23">Maintainers</a></h3>
597604
<p>This module is maintained by the OCA.</p>
598605
<a class="reference external image-reference" href="https://odoo-community.org">
599606
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />

auth_oidc/tests/test_auth_oidc_auth_code.py

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from odoo.exceptions import AccessDenied
1818
from odoo.tests import common
1919

20-
from odoo.addons.website.tools import MockRequest as _MockRequest
20+
from odoo.addons.http_routing.tests.common import MockRequest as _MockRequest
2121

2222
from ..controllers.main import OpenIDLogin
2323

@@ -70,9 +70,19 @@ def _generate_key():
7070

7171
def setUp(self):
7272
super().setUp()
73-
# search our test provider and bind the demo user to it
74-
self.provider_rec = self.env["auth.oauth.provider"].search(
75-
[("client_id", "=", "auth_oidc-test")]
73+
# set up our test provider to bind the test user to it
74+
self.provider_rec = self.env["auth.oauth.provider"].create(
75+
{
76+
"name": "OAuth Provider for TestAuthOIDCAuthorizationCodeFlow",
77+
"client_id": "auth_oidc-test",
78+
"enabled": True,
79+
"body": "Config of an oauth provider for tests",
80+
"scope": "openid email",
81+
"flow": "id_token_code",
82+
"auth_endpoint": "http://localhost:8080/auth/realms/master/protocol/openid-connect/auth",
83+
"token_endpoint": "http://localhost:8080/auth/realms/master/protocol/openid-connect/token",
84+
"jwks_uri": "http://localhost:8080/auth/realms/master/protocol/openid-connect/certs",
85+
}
7686
)
7787
self.assertEqual(len(self.provider_rec), 1)
7888

@@ -98,7 +108,10 @@ def test_auth_link(self):
98108
self.assertEqual(params["redirect_uri"], [BASE_URL + "/auth_oauth/signin"])
99109

100110
def _prepare_login_test_user(self):
101-
user = self.env.ref("base.user_demo")
111+
user = self.env["res.users"].create({
112+
"login": "auth_oidc_test_user",
113+
"name": "Auth OIDC Test User",
114+
})
102115
user.write({"oauth_provider_id": self.provider_rec.id, "oauth_uid": user.login})
103116
return user
104117

test-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
responses

0 commit comments

Comments
 (0)