diff options
author | Robin McCorkell <rmccorkell@owncloud.com> | 2015-08-24 16:13:16 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2016-01-18 11:10:41 +0100 |
commit | da4127d23b168dbb34c066d9590b3fe1b965af46 (patch) | |
tree | 22d3ac5060211b44a305c989c88ee9896a9870ad /db_structure.xml | |
parent | 88cd61521459a18599407f83347f1d6a0e7700cc (diff) | |
download | nextcloud-server-da4127d23b168dbb34c066d9590b3fe1b965af46.tar.gz nextcloud-server-da4127d23b168dbb34c066d9590b3fe1b965af46.zip |
Introduce CredentialsManager for storage of credentials in DB
CredentialsManager performs a simple role, of storing and retrieving
encrypted credentials from the database. Credentials are stored by user
ID (which may be null) and credentials identifier. Credentials
themselves may be of any type that can be JSON encoded.
The rationale behind this is to avoid further (mis)use of
oc_preferences, which was being used for all manner of data not related
to user preferences.
Diffstat (limited to 'db_structure.xml')
-rw-r--r-- | db_structure.xml | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/db_structure.xml b/db_structure.xml index e4bd8d998ee..cfda315e3c2 100644 --- a/db_structure.xml +++ b/db_structure.xml @@ -1493,5 +1493,60 @@ </table> + <table> + <!-- + Encrypted credentials storage + --> + <name>*dbprefix*credentials</name> + + <declaration> + + <field> + <name>user</name> + <type>text</type> + <default></default> + <notnull>false</notnull> + <length>64</length> + </field> + + <field> + <name>identifier</name> + <type>text</type> + <notnull>true</notnull> + <length>64</length> + </field> + + <field> + <name>credentials</name> + <type>clob</type> + <notnull>false</notnull> + </field> + + <index> + <name>credentials_user_id</name> + <primary>true</primary> + <unique>true</unique> + <field> + <name>user</name> + <sorting>ascending</sorting> + </field> + <field> + <name>identifier</name> + <sorting>ascending</sorting> + </field> + </index> + + <index> + <name>credentials_user</name> + <unique>false</unique> + <field> + <name>user</name> + <sorting>ascending</sorting> + </field> + </index> + + </declaration> + + </table> </database> |