-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathauth.php
More file actions
30 lines (27 loc) · 977 Bytes
/
auth.php
File metadata and controls
30 lines (27 loc) · 977 Bytes
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
<?php
// CloudSponge.com PHP Library v0.9 Beta
// http://www.cloudsponge.com
// Copyright (c) 2010 Cloud Copy, Inc.
// Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
//
// Written by Graeme Rouse
// graeme@cloudsponge.com
require_once 'csimport.php';
$response = CSImport::forward_auth($_GET, $_POST);
if (isset($response['redirect'])) {
// This is our successful case
// calling header(..) only works if no body
// content has been sent yet. If you are integrating this
// page in a web application framework,
// you may need to redirect differently.
// E.g. With Kohana:
// url::redirect($response['redirect']);
header($response['redirect']);
} else {
// We shouldn't get here
echo $response['body'];
}
// calling exit here to ensure that the response is sent, event if there is no body content.
// Thanks to Chris McKeever of GiveForward.com for discovering this issue when integrating with Kohana.
exit;
?>