xref: /plugin/oauth/conf/metadata.php (revision 4fe1f30f8560b4eb568d645b14d23eac53255b2c)
1<?php
2/**
3 * Options for the oauth plugin
4 *
5 * @author Andreas Gohr <andi@splitbrain.org>
6 */
7
8class setting_plugin_oauth extends setting {
9
10    function update($input) {
11        return true;
12    }
13
14    public function html(&$plugin, $echo = false) {
15        /** @var helper_plugin_oauth $hlp */
16        $hlp = plugin_load('helper', 'oauth');
17
18        $key   = htmlspecialchars($this->_key);
19        $value = '<code>'.$hlp->redirectURI().'</code>';
20
21        $label = '<label for="config___'.$key.'">'.$this->prompt($plugin).'</label>';
22        $input = '<div>'.$value.'</div>';
23        return array($label, $input);
24    }
25
26}
27
28$meta['info']                = array('plugin_oauth');
29$meta['facebook-key']        = array('string');
30$meta['facebook-secret']     = array('string');
31$meta['github-key']          = array('string');
32$meta['github-secret']       = array('string');
33$meta['google-key']          = array('string');
34$meta['google-secret']       = array('string');
35$meta['google-hosted-domain']= array('string');
36$meta['yahoo-key']           = array('string');
37$meta['yahoo-secret']        = array('string');
38$meta['doorkeeper-key']      = array('string');
39$meta['doorkeeper-secret']   = array('string');
40$meta['doorkeeper-authurl']  = array('string');
41$meta['doorkeeper-tokenurl'] = array('string');
42$meta['singleService']       = array('multichoice',
43                                     '_choices' => array(
44                                         '',
45                                         'Google',
46                                         'Facebook',
47                                         'Github',
48                                         'Yahoo',
49                                         'Doorkeeper',));
50