����JFIF��x�x����'403WebShell
403Webshell
Server IP : 78.140.185.180  /  Your IP : 3.22.42.249
Web Server : LiteSpeed
System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User : builderbox ( 1072)
PHP Version : 7.3.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/builderbox/www/vendor/rackspace/php-opencloud/doc/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/builderbox/www/vendor/rackspace/php-opencloud/doc//auth.rst
Authentication
==============

The client does not automatically authenticate against the API when it is
instantiated - it waits for an API call. When this happens, it checks
whether the current “token” has expired, and (re-)authenticates if
necessary.

You can force authentication, by calling:

.. code-block:: php

  $client->authenticate();

If the credentials are incorrect, a ``401`` error will be returned. If
credentials are correct, a ``200`` status is returned with your Service
Catalog.


Service Catalog
---------------

The Service Catalog is returned on successful authentication, and is
composed of all the different API services available to the current
tenant. All of this functionality is encapsulated in the ``Catalog``
object, which allows you greater control and interactivity.

.. code-block:: php

  /** @var OpenCloud\Common\Service\Catalog */
  $catalog = $client->getCatalog();

  // Return a list of OpenCloud\Common\Service\CatalogItem objects
  foreach ($catalog->getItems() as $catalogItem) {

      $name = $catalogItem->getName();
      $type = $catalogItem->getType();

      if ($name == 'cloudServersOpenStack' && $type == 'compute') {
          break;
      }

      // Array of OpenCloud\Common\Service\Endpoint objects
      $endpoints = $catalogItem->getEndpoints();
      foreach ($endpoints as $endpoint) {
          if ($endpoint->getRegion() == 'DFW') {
              echo $endpoint->getPublicUrl();
          }
      }
  }

As you can see, you have access to each Service’s name, type and list of
endpoints. Each endpoint provides access to the specific region, along
with its public and private endpoint URLs.

Youez - 2016 - github.com/yon3zu
LinuXploit