1<?php 2 3namespace dokuwiki\plugin\oauthdoorkeeper; 4 5use dokuwiki\plugin\oauth\Service\AbstractOAuth2Base; 6use OAuth\Common\Http\Uri\Uri; 7 8/** 9 * Custom Service for Doorkeeper 10 */ 11class DoorKeeper extends AbstractOAuth2Base 12{ 13 14 /** @inheritdoc */ 15 public function getAuthorizationEndpoint() 16 { 17 $plugin = plugin_load('action', 'oauthdoorkeeper'); 18 return new Uri($plugin->getConf('baseurl') . '/oauth/authorize'); 19 } 20 21 /** @inheritdoc */ 22 public function getAccessTokenEndpoint() 23 { 24 $plugin = plugin_load('action', 'oauthdoorkeeper'); 25 return new Uri($plugin->getConf('baseurl') . '/oauth/token'); 26 } 27 28 /** 29 * @inheritdoc 30 */ 31 protected function getAuthorizationMethod() 32 { 33 return static::AUTHORIZATION_METHOD_QUERY_STRING; 34 } 35} 36