Skip to Content
Menu

Standard OAuth2 Server

by
Odoo

20.81

v 16.0 Third Party 25
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 548
Technical Name it9_oauth2_server
LicenseOPL-1
Websitehttps://github.com/superpkson
Versions 15.0 16.0
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 548
Technical Name it9_oauth2_server
LicenseOPL-1
Websitehttps://github.com/superpkson
Versions 15.0 16.0

Standard OAuth2 Server

by IT9@2022

Let your Odoo ERP be an authentication server. Other applications that supported OAuth2 can connect with your Odoo account.

  • Users can sign in multiple apps with just a single account.
  • Administrators can control all connected applications in one site.
  • Developers can restrict what can be accessed by the collab applications.

How It Works

Please refer (https://oauth.net/2/) for more details about OAuth 2.0.


User Guide

This section will show you how to set up the OAuth2 server to let other sites/apps to access.

  • Client Name: The name that can identify which application is it
  • Logo: The URL of image that can identify the application
  • Client Website: The URL of application
  • Grant Types: Which type of authentication methods can be used by this application
  • Redirect Uris: Which pages can be redirected to while processing grant type = "Authorization Code"
  • Response Types: The result format of token response
  • Scopes: This application can only access the Odoo resources which has this scope
  • Token Expires in: The default expire period of token. The unit is seconds.
  • Expired at: This application will not able to access after this date
Cautions

The client ID and secret will not display while creating the record. You can find the ID after saved the record and get the secret by clicking the refresh button.

How to apply

Please read (https://oauth.net/2/) to realize which parameters need to be passed.

  • Authorization Page
    • GET {Your Odoo Server}/oauth/authorize
    • e.g. http://localhost:8069/oauth/authorize
  • Access Token
    • POST {Your Odoo Server}/oauth/token
    • e.g. http://localhost:8069/oauth/token
  • Basic User Profile
    • GET {Your Odoo Server}/oauth/profile
    • e.g. http://localhost:8069/oauth/profile

Developer Guide

Please take a look for a reference at "/controllers/profile.py"

When building the interface for other applications, you can set the "auth" to "it9_oauth2_server" and define a new scope in the "@http.route". This addon will automatically verify the token and the permission.

Cautions

If you defined a new scope, please create a correlation record at model "oauth2.scope". After that, the administrators can assign the new scope to applications.


Odoo Proprietary License v1.0

This software and associated files (the "Software") may only be used (executed,
modified, executed after modifications) if you have purchased a valid license
from the authors, typically via Odoo Apps, or if you have received a written
agreement from the authors of the Software (see the COPYRIGHT file).

You may develop Odoo modules that use the Software as a library (typically
by depending on it, importing it and using its resources), but without copying
any source code or material from the Software. You may distribute those
modules under the license of your choice, provided that this license is
compatible with the terms of the Odoo Proprietary License (For example:
LGPL, MIT, or proprietary licenses similar to this one).

It is forbidden to publish, distribute, sublicense, or sell copies of the Software
or modified copies of the Software.

The above copyright notice and this permission notice must be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author or have a question related to your purchase, please use the support page.
There are no ratings yet!
Odoo 17 Version request
by
Anand
on 9/3/24, 3:12 PM

Is the Odoo 17 version of this module available? Thank you


odoo login
by
Gordon
on 11/9/23, 9:31 PM

Hi, I have a question, please advice if this possible 

2 odoo servers.

How to config one odoo to login as from this oauth server odoo.

Thank you.