diff options
Diffstat (limited to 'apps/twofactor_backupcodes/appinfo')
-rw-r--r-- | apps/twofactor_backupcodes/appinfo/app.php | 22 | ||||
-rw-r--r-- | apps/twofactor_backupcodes/appinfo/database.xml | 48 | ||||
-rw-r--r-- | apps/twofactor_backupcodes/appinfo/info.xml | 19 | ||||
-rw-r--r-- | apps/twofactor_backupcodes/appinfo/routes.php | 35 |
4 files changed, 124 insertions, 0 deletions
diff --git a/apps/twofactor_backupcodes/appinfo/app.php b/apps/twofactor_backupcodes/appinfo/app.php new file mode 100644 index 00000000000..31f9b6b8eae --- /dev/null +++ b/apps/twofactor_backupcodes/appinfo/app.php @@ -0,0 +1,22 @@ +<?php + +/** + * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +OC_App::registerPersonal('twofactor_backupcodes', 'settings/personal'); diff --git a/apps/twofactor_backupcodes/appinfo/database.xml b/apps/twofactor_backupcodes/appinfo/database.xml new file mode 100644 index 00000000000..02ca7c93a1e --- /dev/null +++ b/apps/twofactor_backupcodes/appinfo/database.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="ISO-8859-1" ?> +<database> + <name>*dbname*</name> + <create>true</create> + <overwrite>false</overwrite> + <charset>utf8</charset> + <table> + <name>*dbprefix*twofactor_backup_codes</name> + <declaration> + <field> + <name>id</name> + <type>integer</type> + <autoincrement>1</autoincrement> + <default>0</default> + <notnull>true</notnull> + <length>4</length> + </field> + <field> + <name>user_id</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>64</length> + </field> + <field> + <name>code</name> + <type>text</type> + <notnull>true</notnull> + <length>64</length> + </field> + <field> + <name>used</name> + <type>integer</type> + <notnull>true</notnull> + <default>0</default> + <length>1</length> + </field> + + <index> + <name>two_factor_backupcodes_user_id</name> + <field> + <name>user_id</name> + <sorting>ascending</sorting> + </field> + </index> + </declaration> + </table> +</database> diff --git a/apps/twofactor_backupcodes/appinfo/info.xml b/apps/twofactor_backupcodes/appinfo/info.xml new file mode 100644 index 00000000000..45e9b022bbf --- /dev/null +++ b/apps/twofactor_backupcodes/appinfo/info.xml @@ -0,0 +1,19 @@ +<?xml version="1.0"?> +<info> + <id>twofactor_backupcodes</id> + <name>Two factor backup codes</name> + <description>A two-factor auth backup codes provider</description> + <licence>agpl</licence> + <author>Christoph Wurst</author> + <version>1.0.0</version> + <namespace>TwoFactor_BackupCodes</namespace> + <category>other</category> + + <two-factor-providers> + <provider>OCA\TwoFactor_BackupCodes\Provider\BackupCodesProvider</provider> + </two-factor-providers> + + <dependencies> + <owncloud min-version="9.2" max-version="9.2" /> + </dependencies> +</info> diff --git a/apps/twofactor_backupcodes/appinfo/routes.php b/apps/twofactor_backupcodes/appinfo/routes.php new file mode 100644 index 00000000000..f2af12e9b45 --- /dev/null +++ b/apps/twofactor_backupcodes/appinfo/routes.php @@ -0,0 +1,35 @@ +<?php + +/** + * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +return [ + 'routes' => [ + [ + 'name' => 'settings#state', + 'url' => '/settings/state', + 'verb' => 'GET' + ], + [ + 'name' => 'settings#createCodes', + 'url' => '/settings/create', + 'verb' => 'POST' + ], + ] +]; |