Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3396859

Browse files
rootroot
root
authored and
root
committed
a little fix
1 parent c0bb058 commit 3396859

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

‎config.php‎

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
<?php
2-
32
$config = [
43
//main endpont:
5-
"service"=>"__http://SERVICE.ENDPOINT/__",
6-
//oauth endpoint:
7-
"sso"=>"__http://SERVICE.ENDPOINT/oauth__",
8-
"client_id"=>"__CLIENT_ID__",
9-
"client_secret"=>"__CLIENT_SECRET__",
4+
"service"=>"http://sandbox.fanapium.com:8080/",
5+
"sso"=>"http://sandbox.fanapium.com/oauth2/",
6+
"sso_service"=>"http://sandbox.fanapium.com/",
7+
"client_id"=>"40f6433a961bc1aff11b5ba3",
8+
"client_secret"=>"9bf8077e",
109
//the url of where this app is deployed
11-
"home"=>"http://WHERE_THIS_CODE_DEPLOYED/"
12-
];
10+
"home"=>"http://79.174.163.69/php-oauth-simple/"
11+
];
12+
13+
14+
15+

‎return.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
session_start();
44
$_SESSION['keylead_code']=$_GET['code'];
55

6-
$url = 'demo.fanapium.com:12594/oauth2/token/';
6+
$url = $config['sso'].'/token/';
77
$ch = curl_init($url);
88
$fields = "client_id={$config['client_id']}&client_secret={$config['client_secret']}&code={$_GET['code']}&redirect_uri={$config['home']}return.php&grant_type=authorization_code";
99
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
@@ -16,4 +16,4 @@
1616
$_SESSION['access_token']= $token->access_token;
1717
$_SESSION['refresh_token']= $token->refresh_token;
1818

19-
header("Location: {$config['home']}index.php");
19+
header("Location: {$config['home']}index.php");

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /