summaryrefslogtreecommitdiff
path: root/addons/auth_oauth/auth_oauth.py
diff options
context:
space:
mode:
Diffstat (limited to 'addons/auth_oauth/auth_oauth.py')
-rw-r--r--addons/auth_oauth/auth_oauth.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/addons/auth_oauth/auth_oauth.py b/addons/auth_oauth/auth_oauth.py
index e258505868d..34b6aa44936 100644
--- a/addons/auth_oauth/auth_oauth.py
+++ b/addons/auth_oauth/auth_oauth.py
@@ -1,6 +1,6 @@
from openerp.osv import osv, fields
-class auth_oauth_providers(osv.osv):
+class auth_oauth_provider(osv.osv):
"""Class defining the configuration values of an OAuth2 provider"""
_name = 'auth.oauth.provider'
@@ -8,15 +8,17 @@ class auth_oauth_providers(osv.osv):
_order = 'name'
_columns = {
- 'name' : fields.char('Provider name', required=True), # Name of the OAuth2 entity, Google, LinkedIn, etc
- 'client_id' : fields.char('Client ID', required=True), # Our identifier
- 'auth_endpoint' : fields.char('Authentication URL', required=True), # OAuth provider URL to authenticate users
+ 'name' : fields.char('Provider name'), # Name of the OAuth2 entity, Google, LinkedIn, etc
+ 'client_id' : fields.char('Client ID'), # Our identifier
+ 'auth_endpoint' : fields.char('Authentication URL'), # OAuth provider URL to authenticate users
'scope' : fields.char('Scope'), # OAUth user data desired to access
'validation_endpoint' : fields.char('Validation URL'), # OAuth provider URL to validate tokens
'data_endpoint' : fields.char('Data URL'),
+ 'enabled' : fields.boolean('Allowed'),
'css_class' : fields.char('CSS class'),
'body' : fields.char('Body'),
- 'active' : fields.boolean('Active'),
'sequence' : fields.integer(),
}
-
+ _defaults = {
+ 'enabled' : False,
+ }