-
-
Save wjgilmore/011f11455b62f35bfefbcfb0b7d8d143 to your computer and use it in GitHub Desktop.
Callback script for Active Directory OAuth
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$qs = $_SERVER['QUERY_STRING']; | |
$domain = 'https://demo.dreamfactory.com/'; | |
# Create a connection | |
$url = $domain . '/api/v2/user/session?oauth_callback=true&' . $qs; | |
$ch = curl_init($url); | |
# Setting our options | |
curl_setopt($ch, CURLOPT_POST, 1); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
# Get the response | |
$response = curl_exec($ch); | |
curl_close($ch); | |
var_dump(json_decode($response)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment