xref: /plugin/oauth/conf/metadata.php (revision 26eb6013194666a72a234e001fadd925c05d3c2e)
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['yahoo-key']       = array('string');
36$meta['yahoo-secret']    = array('string');
37