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 8*26eb6013SAndreas Gohrclass setting_plugin_oauth extends setting { 9*26eb6013SAndreas Gohr 10*26eb6013SAndreas Gohr function update($input) { 11*26eb6013SAndreas Gohr return true; 12*26eb6013SAndreas Gohr } 13*26eb6013SAndreas Gohr 14*26eb6013SAndreas Gohr public function html(&$plugin, $echo = false) { 15*26eb6013SAndreas Gohr /** @var helper_plugin_oauth $hlp */ 16*26eb6013SAndreas Gohr $hlp = plugin_load('helper', 'oauth'); 17*26eb6013SAndreas Gohr 18*26eb6013SAndreas Gohr $key = htmlspecialchars($this->_key); 19*26eb6013SAndreas Gohr $value = '<code>'.$hlp->redirectURI().'</code>'; 20*26eb6013SAndreas Gohr 21*26eb6013SAndreas Gohr $label = '<label for="config___'.$key.'">'.$this->prompt($plugin).'</label>'; 22*26eb6013SAndreas Gohr $input = '<div>'.$value.'</div>'; 23*26eb6013SAndreas Gohr return array($label, $input); 24*26eb6013SAndreas Gohr } 25*26eb6013SAndreas Gohr 26*26eb6013SAndreas Gohr} 27*26eb6013SAndreas Gohr 28*26eb6013SAndreas 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