180852c15SAndreas Gohr<?php 280852c15SAndreas Gohr/** 380852c15SAndreas Gohr * Options for the oauth plugin 480852c15SAndreas Gohr * 580852c15SAndreas Gohr * @author Andreas Gohr <andi@splitbrain.org> 680852c15SAndreas Gohr */ 780852c15SAndreas Gohr 826eb6013SAndreas Gohrclass setting_plugin_oauth extends setting { 926eb6013SAndreas Gohr 1026eb6013SAndreas Gohr function update($input) { 1126eb6013SAndreas Gohr return true; 1226eb6013SAndreas Gohr } 1326eb6013SAndreas Gohr 1426eb6013SAndreas Gohr public function html(&$plugin, $echo = false) { 1526eb6013SAndreas Gohr /** @var helper_plugin_oauth $hlp */ 1626eb6013SAndreas Gohr $hlp = plugin_load('helper', 'oauth'); 1726eb6013SAndreas Gohr 1826eb6013SAndreas Gohr $key = htmlspecialchars($this->_key); 1926eb6013SAndreas Gohr $value = '<code>'.$hlp->redirectURI().'</code>'; 2026eb6013SAndreas Gohr 2126eb6013SAndreas Gohr $label = '<label for="config___'.$key.'">'.$this->prompt($plugin).'</label>'; 2226eb6013SAndreas Gohr $input = '<div>'.$value.'</div>'; 2326eb6013SAndreas Gohr return array($label, $input); 2426eb6013SAndreas Gohr } 2526eb6013SAndreas Gohr 2626eb6013SAndreas Gohr} 2726eb6013SAndreas Gohr 2826eb6013SAndreas Gohr$meta['info'] = array('plugin_oauth'); 2943972fa4SAndreas Gohr$meta['facebook-key'] = array('string'); 3043972fa4SAndreas Gohr$meta['facebook-secret'] = array('string'); 3143972fa4SAndreas Gohr$meta['github-key'] = array('string'); 3243972fa4SAndreas Gohr$meta['github-secret'] = array('string'); 3343972fa4SAndreas Gohr$meta['google-key'] = array('string'); 3443972fa4SAndreas Gohr$meta['google-secret'] = array('string'); 35551dc731SAndreas Gohr$meta['yahoo-key'] = array('string'); 36551dc731SAndreas Gohr$meta['yahoo-secret'] = array('string'); 37*3b2654aaSAndreas Gohr$meta['doorkeeper-key'] = array('string'); 38*3b2654aaSAndreas Gohr$meta['doorkeeper-secret'] = array('string'); 39*3b2654aaSAndreas Gohr$meta['doorkeeper-authurl'] = array('string'); 40*3b2654aaSAndreas Gohr$meta['doorkeeper-tokenurl'] = array('string'); 41