TIP: You can type at any time to perform a new search.
OAuth Provider
oauth_provider · OCA/server-tools
- Repository
- OCA/server-tools · module folder · Try on Runboat
- Module version
- 1.0.0
- Category
- Authentication
- Folder size
- 1.55 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- http://www.syleam.fr/
- Last tracking update
- 2026-08-07 07:10:01
- Authors
- SYLEAM, Odoo Community Association (OCA)
- Maintainers
- SYLEAM, Odoo Community Association (OCA)
- Committers
- Christophe Combelles, Weblate, OCA Transbot, OCA-git-bot, oca-travis, Sylvain GARANCHER
- Odoo dependencies
-
odoo/odoo:- base
- Python dependencies
- oauthlib
- System dependencies
- None
- Required by
- oauth_provider_jwt
- Description
Code Analysis ⓘ
Views touched (8)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
oauth_provider.authorization |
OAuth Authorization Error | ir.ui.view | qweb | New |
oauth_provider.authorization_error |
OAuth Authorization Error | ir.ui.view | qweb | New |
view_oauth_provider_client_form |
oauth.provider.client.form | oauth.provider.client | form | New |
view_oauth_provider_client_search |
oauth.provider.client.search | oauth.provider.client | search | New |
view_oauth_provider_client_tree |
oauth.provider.client.tree | oauth.provider.client | tree | New |
view_oauth_provider_scope_form |
oauth.provider.scope.form | oauth.provider.scope | form | New |
view_oauth_provider_scope_search |
oauth.provider.scope.search | oauth.provider.scope | search | New |
view_oauth_provider_scope_tree |
oauth.provider.scope.tree | oauth.provider.scope | tree | New |
HTTP endpoints (7)
| Route(s) | Handler | Auth | Type | Methods | Flags |
|---|---|---|---|---|---|
/oauth2/authorize |
OAuth2ProviderController.authorize |
user | http | GET | |
/oauth2/authorize |
OAuth2ProviderController.authorize_post |
user | http | POST | |
/oauth2/otherinfo |
OAuth2ProviderController.otherinfo |
none | http | GET | |
/oauth2/revoke_token |
OAuth2ProviderController.revoke_token |
none | http | POST | |
/oauth2/token |
OAuth2ProviderController.token |
none | http | POST | csrf off sudo |
/oauth2/tokeninfo |
OAuth2ProviderController.tokeninfo |
none | http | GET | |
/oauth2/userinfo |
OAuth2ProviderController.userinfo |
none | http | GET |
Models touched (6)
New fields (6)
-
activeBooleandefault=Truehelp='When unchecked, the code is invalidated.' -
client_idMany2one → oauth.provider.clientcomodel_name='oauth.provider.client'help='Client associated to this authorization code.'required=Truestring='Client' -
codeCharhelp='Name of the authorization code.'required=True -
redirect_uri_idMany2one → oauth.provider.redirect.uricomodel_name='oauth.provider.redirect.uri'help='Redirect URI associated to this authorization code.'required=Truestring='Redirect URI' -
scope_idsMany2many → oauth.provider.scopecomodel_name='oauth.provider.scope'help='Scopes allowed by this authorization code.'string='Scopes' -
user_idMany2one → res.userscomodel_name='res.users'help='User associated to this authorization code.'required=Truestring='User'
No public methods.
New fields (10)
-
application_typeSelectiondefault='web application'help='Application type to be used with this client.'required=Trueselection=[('web application', 'Web Application'), ('mobile application', 'Mobile Application'), ('legacy application', 'Legacy Application'), ('backend application', 'Backend Application (not implemented)')] -
grant_typeSelectioncompute='_compute_grant_response_type'help='Grant type used by the client for OAuth.'selection=[('authorization_code', 'Authorization Code'), ('implicit', 'Implicit'), ('password', 'Password'), ('client_credentials', 'Client Credentials')]store=Truestring='OAuth Grant Type' -
identifierCharcopy=Falsedefault=<expr>help='Unique identifier of the client.'readonly=Truerequired=Truestring='Client Identifier' -
nameCharhelp='Name of this client.'required=True -
redirect_uri_idsOne2many → oauth.provider.redirect.uricomodel_name='oauth.provider.redirect.uri'help='Allowed redirect URIs for the client.'inverse_name='client_id'string='OAuth Redirect URIs' -
response_typeSelectioncompute='_compute_grant_response_type'help='Response type used by the client for OAuth.'selection=[('code', 'Authorization Code'), ('token', 'Token'), ('none', 'None')]store=Truestring='OAuth Response Type' -
scope_idsMany2many → oauth.provider.scopecomodel_name='oauth.provider.scope'help='List of scopes the client is allowed to access.'string='Allowed Scopes' -
secretCharhelp='Optional secret used to authenticate the client.' -
skip_authorizationBooleanhelp="Check this box if the user shouldn't be prompted to authorize or not the requested scopes." -
token_typeSelectiondefault='random'help='Type of token to return. The base module only provides randomly generated tokens.'required=Trueselection=[('random', 'Randomly generated')]
-
application_type_mapping(self)@api.model -
generate_user_id(self, user)@api.multiGenerates a unique user identifier for this client Include the client and user identifiers in the final identifier to generate a different identifier for the same user, depending on the client accessing this user. By doing this, clients cannot find a list of common users by comparing their identifiers list from tokeninfo. -
get_oauth2_server(self, validator=None, **kwargs)@api.multiReturns an OAuth2 server instance, depending on the client application type Generates an OdooValidator instance if no custom validator is defined All other arguments are directly passed to the server constructor (for example, a token generator function)
New fields (3)
-
client_idMany2one → oauth.provider.clientcomodel_name='oauth.provider.client'help='Client allowed to redirect using this URI.'required=Truestring='Client' -
nameCharhelp='URI of the redirect.'required=True -
sequenceIntegerdefault=10help='Order of the redirect URIs.'required=True
No public methods.
New fields (7)
-
codeCharhelp='Code of the scope, used in OAuth requests.'required=True -
descriptionTexthelp='Description of the scope, displayed to the user.'required=Truetranslate=True -
field_idsMany2many → ir.model.fieldscomodel_name='ir.model.fields'domain="[('model_id', '=', model_id)]"help='Fields allowed by this scope.'string='Fields' -
filter_idMany2one → ir.filterscomodel_name='ir.filters'domain="[('model_id', '=', model)]"help='Filter applied to retrieve records allowed by this scope.'string='Filter' -
modelCharhelp='Name of the model allowed to be accessed by this scope.'readonly=Truerelated='model_id.model'string='Model Name' -
model_idMany2one → ir.modelcomodel_name='ir.model'help='Model allowed to be accessed by this scope.'required=Truestring='Model' -
nameCharhelp='Name of the scope, displayed to the user.'required=Truetranslate=True
-
get_data_for_model(self, model, res_id=None, all_scopes_match=False)@api.multiReturn the data matching the scopes from the requested model
New fields (8)
-
activeBooleancompute='_compute_active'help='A token is active only if it has not yet expired.'search='_search_active' -
client_idMany2one → oauth.provider.clientcomodel_name='oauth.provider.client'help='Client associated to this token.'required=Truestring='Client' -
expires_atDatetimehelp='Expiration time of the token.'required=True -
refresh_tokenCharhelp='The refresh token, if applicable.' -
scope_idsMany2many → oauth.provider.scopecomodel_name='oauth.provider.scope'help='Scopes allowed by this token.'string='Scopes' -
tokenCharhelp='The token itself.'required=True -
token_typeSelectiondefault='Bearer'help='Type of token stored. Currently, only the bearer token type is available.'required=Trueselection=[('Bearer', 'Bearer')] -
user_idMany2one → res.userscomodel_name='res.users'help='User associated to this token.'required=Truestring='User'
-
generate_user_id(self)@api.multiGenerates a unique user identifier for this token -
get_data_for_model(self, model, res_id=None, all_scopes_match=False)@api.multiReturns the data of the accessible records of the requested model, Data are returned depending on the allowed scopes for the token If the all_scopes_match argument is set to True, return only records allowed by all token's scopes
New fields (1)
-
oauth_identifierCharcopy=Falsedefault=<expr>help='String used to identify this user during an OAuth session.'readonly=Truerequired=Truestring='OAuth Identifier'
No public methods.