跳至內容
選單
此問題已被標幟
1 回覆
8016 瀏覽次數

I use http.request.session.authenticate() for user login, and then http.requests.session.sid to get the session_id, but this session_id cannot be authenticated。

頭像
捨棄
最佳答案

Hi,

Try use the following code.

def authenticate(self, db, login, password, base_location=None):
        uid = None
        session_info = None
        uid = request.session.authenticate(db, login, password)
        session_info = request.env['ir.http'].session_info()
        return session_info

Regards

頭像
捨棄