when i call /web/session/authenticate
using this body:
{ "jsonrpc": "2.0", "params": { "db": "odoo15", "login": "test@test.com", "password": "test" }}
i get a response but with no session_id in it
when i call /web/session/authenticate
using this body:
{ "jsonrpc": "2.0", "params": { "db": "odoo15", "login": "test@test.com", "password": "test" }}
i get a response but with no session_id in it
Hi
Yassine Sawahi,
You can find the session_id from the cookies in Postman after calling the authentication endpoint.
Hope it Helps,
Kiran K
i added session_id in session_info now i get a session_id but its not the same as the one in the cookie, also when i do any request to a user protected route it says session expired i tried passing the session everywhere i modified odoo's code to print the session info apparently im not passing any session id to it thats why its saying session expired i think so how can i pass the session_id.
def session_info(self):
user = request.env.user
version_info = odoo.service.common.exp_version()
session_uid = request.session.uid
session_id = request.session.sid
# print(request.session)
user_context = request.session.get_context() if session_uid else {}
IrConfigSudo = self.env['ir.config_parameter'].sudo()
max_file_upload_size = int(IrConfigSudo.get_param(
'web.max_file_upload_size',
default=128 * 1024 * 1024, # 128MiB
))
mods = odoo.conf.server_wide_modules or []
if request.db:
mods = list(request.registry._init_modules) + mods
lang = user_context.get("lang")
translation_hash = request.env['ir.translation'].sudo().get_web_translations_hash(mods, lang)
session_info = {
"uid": session_uid,
"session_id": session_id,
def _auth_method_user(cls):
request.uid = request.session.uid
# print("session: ", request.session)
if not request.uid:
raise http.SessionExpiredException("Session expired")
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up| Related Posts | Replies | Views | Activity | |
|---|---|---|---|---|
|
1
Sep 23
|
7440 | |||
|
0
Oct 20
|
5143 | |||
|
CAS Authentication
Solved
|
5
Feb 19
|
9248 | ||
|
0
Feb 18
|
3096 | |||
|
0
Mar 15
|
4617 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.
See: https://www.youtube.com/watch?v=Lvq73jbygFE&t=22s