forked from xing/xing-api-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.php
More file actions
executable file
·32 lines (28 loc) · 1.11 KB
/
config.php
File metadata and controls
executable file
·32 lines (28 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
// Hybrid-Auth Config file: http://hybridauth.sourceforge.net/userguide/Configuration.html
function getSiteBaseUrl()
{
$protocol = ( !empty( $_SERVER[ 'HTTPS' ] ) && $_SERVER[ 'HTTPS' ] !== 'off' || $_SERVER[ 'SERVER_PORT' ] == 443 ) ? "https://" : "http://";
$domainName = $_SERVER[ 'HTTP_HOST' ];
return $protocol . $domainName;
}
$config = array(
"base_url" => getSiteBaseUrl() . '/endpoint',
// if we want to debug the Hybrid Auth flow
// "debug_mode" => true,
// "debug_file" => sys_get_temp_dir() . '/hybridauth.log',
"providers" => array(
"XING" => array(
"enabled" => true,
// go to https://dev.xing.com/applications and create an app to get a test key
"keys" => array(
"key" => "YOUR_CONSUMER_KEY",
"secret" => "YOUR_CONSUMER_SECRET",
),
"wrapper" => array(
"path" => __DIR__ . "/../vendor/hybridauth/hybridauth/additional-providers/hybridauth-xing/Providers/XING.php",
"class" => "Hybrid_Providers_XING",
),
),
),
);