[ADD] Added initial data to providers.

bzr revid: vta@openerp.com-20120814154529-58c60kynpwkckwmc
This commit is contained in:
vta vta@openerp.com 2012-08-14 17:45:29 +02:00
parent 397c67348e
commit eb50d91461
4 changed files with 31 additions and 1 deletions

View File

@ -30,6 +30,7 @@
'website': 'http://www.openerp.com',
'depends': ['base', 'web'],
'data': [
'oauth_providers_data.xml'
],
'update_xml': [
'oauth_providers.xml'

View File

@ -12,8 +12,10 @@ class oauth_providers(osv.osv):
'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
'scope' : fields.char('Accessed user data'), # OAUth user data desired to access
'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'),
'redirect_uris' : fields.char('Redirect URIs'),
'icon_url' : fields.char('Icon'), # URL of the icon's provider
'active' : fields.boolean('Active'),
'sequence' : fields.integer(),

View File

@ -21,6 +21,8 @@
<field name="auth_endpoint" />
<field name="scope" />
<field name="validation_endpoint" />
<field name="data_endpoint" />
<field name="redirect_uris" />
</group>
</sheet>
</form>

View File

@ -0,0 +1,25 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
<record id="1" model="oauth.providers">
<field name="name">Google OAuth2</field>
<field name="client_id">108010644258-duuhmp6pu7li4tsmnqg7j9rvdeklg0ki.apps.googleusercontent.com</field>
<field name="auth_endpoint">https://accounts.google.com/o/oauth2/auth</field>
<field name="scope">https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile</field>
<field name="validation_endpoint">https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=</field>
<field name="data_endpoint">https://www.googleapis.com/oauth2/v1/userinfo?access_token=</field>
<field name="redirect_uris">https://localhost/</field>
<field name="active">True</field>
</record>
<record id="2" model="oauth.providers">
<field name="name">Twitter OAuth2</field>
<field name="client_id">108010644258-duuhmp6pu7li4tsmnqg7j9rvdeklg0ki.apps.twitterusercontent.com</field>
<field name="auth_endpoint">https://api.twitter.com/oauth/request_token</field>
<field name="scope"></field>
<field name="validation_endpoint">https://api.twitter.com/oauth/authorize?oauth_token=</field>
<field name="data_endpoint"></field>
<field name="redirect_uris">https://localhost/</field>
<field name="active">True</field>
</record>
</data>
</openerp>