Migrating SAML from 15.0 to 16.0 : Has the call structure changed ?
chris2fr opened this issue · 2 comments
chris2fr commented
Module
auth_saml
Describe the bug
Working here:
https://github.com/chris2fr/server-auth/tree/16.0
On the controller, I have
@http.route("/auth_saml/signin", type="http", auth="none", csrf=False)
@fragment_to_query_string
# pylint: disable=unused-argument
def signin(self, req = None, **kw):
or just
@http.route("/auth_saml/signin", type="http", auth="none", csrf=False)
@fragment_to_query_string
# pylint: disable=unused-argument
def signin(self, **kw):
or
@http.route("/auth_saml/signin", type="http", auth="none", csrf=False)
@fragment_to_query_string
# pylint: disable=unused-argument
def signin(self, req, **kw):
I keep getting the following error
Taceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1990, in __call__
response = request._serve_db()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1584, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 134, in retrying
result = func()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1613, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1726, in dispatch
return self.request.registry['ir.http']._dispatch(endpoint)
File "/usr/lib/python3/dist-packages/odoo/addons/website/models/ir_http.py", line 235, in _dispatch
response = super()._dispatch(endpoint)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 149, in _dispatch
result = endpoint(**request.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 699, in route_wrapper
result = endpoint(self, *args, **params_ok)
TypeError: AuthSAMLController.signin() missing 1 required positional argument: 'req'
2023-03-09 15:03:02,008 116 INFO resdigita werkzeug: 2a01:e0a:a71:92a0:bc98:d0cd:cb1d:dfbd - - [09/Mar/2023 15:03:02] "POST /auth_saml/signin HTTP/1.1" 500 - 2 0.001 0.003
Expected behavior
Is the /auth_saml/signin call excentric?
vincent-hatakeyama commented
It has changed, just look at the difference between auth_oauth between 15 and 16.
This is not a bug but a question.
See the migration PR on how this is solved.
This ticket should be closed.
github-actions commented
There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.