diff --git a/oauth/token.php b/oauth/token.php index f0ad755..a15973c 100644 --- a/oauth/token.php +++ b/oauth/token.php @@ -8,5 +8,10 @@ require_once __DIR__.'/server.php'; // Handle a request for an OAuth2.0 Access Token and send the response to the client +error_log("token.php \$_POST = " . json_encode($_POST)); +if (substr($_POST["redirect_uri"],0,5) == "http:") { + $_POST["redirect_uri"] = "https" . substr($_POST["redirect_uri"],4); +} + $server->handleTokenRequest(OAuth2\Request::createFromGlobals())->send(); -?> \ No newline at end of file +?>