dev/core#2141 - Schema - Add OAuthClient and OAuthSysToken
[civicrm-core.git] / ext / oauth-client / xml / schema / CRM / OAuth / OAuthClient.xml
1 <table>
2 <base>CRM/OAuth</base>
3 <class>OAuthClient</class>
4 <name>civicrm_oauth_client</name>
5 <add>5.32</add>
6 <field>
7 <name>id</name>
8 <title>Internal Client ID</title>
9 <type>int unsigned</type>
10 <comment>Internal Client ID</comment>
11 <add>5.32</add>
12 </field>
13 <primaryKey>
14 <name>id</name>
15 <autoincrement>true</autoincrement>
16 </primaryKey>
17
18 <field>
19 <name>provider</name>
20 <title>Provider</title>
21 <type>varchar</type>
22 <length>128</length>
23 <pseudoconstant>
24 <callback>CRM_OAuth_BAO_OAuthClient::getProviders</callback>
25 </pseudoconstant>
26 <required>true</required>
27 <comment>Provider</comment>
28 <add>5.32</add>
29 </field>
30 <index>
31 <name>UI_provider</name>
32 <fieldName>provider</fieldName>
33 <add>5.32</add>
34 </index>
35
36 <field>
37 <name>guid</name>
38 <title>Client ID</title>
39 <type>varchar</type>
40 <length>128</length>
41 <required>true</required>
42 <comment>Client ID</comment>
43 <add>5.32</add>
44 </field>
45 <index>
46 <name>UI_guid</name>
47 <fieldName>guid</fieldName>
48 <add>5.32</add>
49 </index>
50
51 <field>
52 <name>secret</name>
53 <title>Client Secret</title>
54 <type>text</type>
55 <comment>Client Secret</comment>
56 <add>5.32</add>
57 <!-- Would prefer this be write-only for std admin, and read-write with special/elevated perm -->
58 <!--<permission>-->
59 <!--<or>manage OAuth client secrets</or>-->
60 <!--</permission>-->
61 </field>
62
63 <field>
64 <name>options</name>
65 <type>text</type>
66 <comment>Extra override options for the service (JSON)</comment>
67 <!-- Ex: urlAuthorize, urlAccessToken, urlResourceOwnerDetails, scopes -->
68 <serialize>JSON</serialize>
69 <add>5.32</add>
70 </field>
71
72 <!-- Lifecycle -->
73
74 <field>
75 <name>is_active</name>
76 <title>Is Active</title>
77 <type>boolean</type>
78 <default>1</default>
79 <required>true</required>
80 <comment>Is the client currently enabled?</comment>
81 <add>5.32</add>
82 </field>
83 <field>
84 <name>created_date</name>
85 <type>timestamp</type>
86 <comment>When the client was created.</comment>
87 <required>true</required>
88 <default>CURRENT_TIMESTAMP</default>
89 <add>5.32</add>
90 </field>
91 <field>
92 <name>modified_date</name>
93 <type>timestamp</type>
94 <comment>When the client was created or modified.</comment>
95 <required>true</required>
96 <default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP</default>
97 <add>5.32</add>
98 </field>
99
100 </table>