forked from rackspace/php-opencloud
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathauth.php
More file actions
27 lines (24 loc) · 689 Bytes
/
auth.php
File metadata and controls
27 lines (24 loc) · 689 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
<?php
/**
* Authentication Sample
*
* @copyright 2012-2013-2013 Rackspace Hosting, Inc.
* See COPYING for licensing information
*
* @package samples
* @version 1.0.0
* @author Glen Campbell <[email protected]>
*
* A very simple example showing how to authenticate using the OpenCloud\OpenStack
* connection object. Replace values {in brackets} with your URL, username, and
* password.
*/
require_once "php-opencloud.php";
// my credentials
define('AUTHURL', '{your authorization URL}');
$mysecret = array(
'username' => '{username}',
'password' => '{password}'
);
// establish our credentials
$connection = new \OpenCloud\OpenStack(AUTHURL, $mysecret);