31bb0cca959877e3db4949fa6ec7b4c110eacc0a
[authserver.git] / token.php
1 <?php
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4  * You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 // Simple server based on https://bshaffer.github.io/oauth2-server-php-docs/cookbook
7
8 // include our OAuth2 Server object
9 require_once __DIR__.'/server.php';
10
11 // Handle a request for an OAuth2.0 Access Token and send the response to the client
12 $server->handleTokenRequest(OAuth2\Request::createFromGlobals())->send();
13
14 ?>