Improvement for OAuth2 Server. Implicit, Resource Owner Password and Client Credentials were added, and refactoring of oauth2 endpoints

This commit is contained in:
eriknyk
2014-08-20 11:36:20 -04:00
parent dfb0647c80
commit c108ea8678
17 changed files with 1609 additions and 64 deletions

View File

@@ -9,7 +9,7 @@ if (! empty($_GET['error'])) {
$http = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http';
$host = $_SERVER['SERVER_NAME'] . ($_SERVER['SERVER_PORT'] != '80' ? ':' . $_SERVER['SERVER_PORT'] : '');
$endpoint = sprintf('%s://%s/api/1.0/%s/token', $http, $host, SYS_SYS);
$endpoint = sprintf('%s://%s/%s/oauth2/token', $http, $host, SYS_SYS);
$code = empty($_GET['code']) ? 'NN' : $_GET['code'];
$clientId = 'x-pm-local-client';