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