İçereği Atla
Menü
Bu soru işaretlendi
2 Cevaplar
862 Görünümler

Fellows, at the present time, we have the typical login from Odoo.


i.sstatic.net/r2qqQdkZ.jpg


However, my company would like to use their corporate login. I was thinking about using an iFrame and the redirect to Odoo since our internal login is built in PHP and we don't have support for Python:


i.sstatic.net/zOEHTJG5.jpg


Is this possible? Or do you have any suggestions? Thanks.​


We're using the cloud edition from Odoo.

Avatar
Vazgeç
Üretici En İyi Yanıt

Hi André, thanks for your answer. Do you have an example or documentation? We are using the cloud one. Perhaps, I missed that part also. Thanks.

Avatar
Vazgeç
En İyi Yanıt

Yes, it is possible.

Odoo logins are managed on the server side, meaning you can develop a service that gets your login session from your PHP server, and using cookies, you send the session information back to Odoo to validate the user.

Then in your Odoo back office, you create a python function that validates with your PHP server if the session is valid or not, and identifies which user is trying to log in.

If the session is accepted by the PHP server, you allow the Odoo session for the specified user, which creates an Odoo session cookie, and returns it to the user's browser (this last part is the default Odoo behavior). 

There are multiple ways to implement this.
For instance, you can also create an API key for the user, and log in through the PHP, which returns the API key and connects with the Odoo server, returning a valid session.  

Notice that a session cookie is only valid when both servers are on the same domain. However, you can manipulate the cookie values on the back office, and manually set its parameters, before returning it to the user's browser.

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
3
Mar 21
11288
2
Oca 25
5566
0
Mar 21
3153
0
Şub 25
939
1
Kas 22
3024