Updates for OAuth2 support
This commit is contained in:
@@ -1293,13 +1293,26 @@ class adminProxy extends HttpProxyController
|
||||
$pmRestClient->delete();
|
||||
}
|
||||
|
||||
$http = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http';
|
||||
$lang = defined( 'SYS_LANG' ) ? SYS_LANG : 'en';
|
||||
$host = $_SERVER['SERVER_NAME'] . ($_SERVER['SERVER_PORT'] != '80' ? ':' . $_SERVER['SERVER_PORT'] : '');
|
||||
|
||||
$endpoint = sprintf(
|
||||
'%s://%s/sys%s/%s/%s/oauth2/grant',
|
||||
$http,
|
||||
$host,
|
||||
SYS_SYS,
|
||||
$lang,
|
||||
SYS_SKIN
|
||||
);
|
||||
|
||||
$oauthClients = new OauthClients();
|
||||
$oauthClients->setClientId('x-pm-local-client');
|
||||
$oauthClients->setClientSecret('179ad45c6ce2cb97cf1029e212046e81');
|
||||
$oauthClients->setClientName('PM Web Designer');
|
||||
$oauthClients->setClientDescription('ProcessMaker Web Designer App');
|
||||
$oauthClients->setClientWebsite('www.processmaker.com');
|
||||
$oauthClients->setRedirectUri('http://pmos/sysworkflow/en/neoclassic/services/oauth2_grant');
|
||||
$oauthClients->setRedirectUri($endpoint);
|
||||
$oauthClients->save();
|
||||
|
||||
$result['success'] = true;
|
||||
|
||||
Reference in New Issue
Block a user