Skip to content

Commit

Permalink
clarify auth docs
Browse files Browse the repository at this point in the history
  • Loading branch information
k0ka committed Jan 19, 2024
1 parent 933bf4b commit a3d2792
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 55 deletions.
2 changes: 2 additions & 0 deletions doc/services/identity/v3/create.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ In order to work with the service you have to :doc:`setup the client </setup>` f
Service can be created via ``identityV3()`` method of the ``OpenStack`` object.

.. sample:: Identity/v3/create.php
:full:

A list of additional options can be passed to the method. For example, to change the region:

.. sample:: Identity/v3/create_with_region.php
:full:
33 changes: 14 additions & 19 deletions doc/setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,27 @@ There are different ways to provide the authentication credentials. See the :doc
section for the full list of options. You should provide credentials to the ``OpenStack`` constructor as an array
the same way you provide options to ``generateToken`` method of the ``Identity`` service.

Authenticate with user ID
~~~~~~~~~~~~~~~~~~~~~~~~~

.. sample:: Setup/user_id.php

Authenticate with username
~~~~~~~~~~~~~~~~~~~~~~~~~~
--------------------------

.. sample:: Setup/username.php
The most common way to authenticate is using the username and password of the user. You should also provide the Domain ID
as usernames will not be unique across an entire OpenStack installation

Authenticate application credential ID
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. sample:: Setup/username.php

.. sample:: Setup/application_credential_id.php
Authenticate with user ID
--------------------------

Authenticate from ID
~~~~~~~~~~~~~~~~~~~~
.. sample:: Setup/user_id.php

.. sample:: Setup/from_id.php
Authenticate application credential ID
--------------------------------------

Scope to project ID
~~~~~~~~~~~~~~~~~~~
.. sample:: Setup/application_credential_id.php

.. sample:: Setup/scoped_to_project_id.php
Authenticate using token ID
--------------------------

Scope to project name
~~~~~~~~~~~~~~~~~~~~~
If you already have a valid token, you can use it to authenticate.

.. sample:: Setup/scoped_to_project_name.php
.. sample:: Setup/token_id.php
1 change: 0 additions & 1 deletion samples/Identity/v3/create_with_region.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

$openstack = new OpenStack\OpenStack([
'authUrl' => '{authUrl}',
'region' => '{region}',
'user' => [
'id' => '{userId}',
'password' => '{password}'
Expand Down
15 changes: 0 additions & 15 deletions samples/Setup/scoped_to_project_id.php

This file was deleted.

20 changes: 0 additions & 20 deletions samples/Setup/scoped_to_project_name.php

This file was deleted.

File renamed without changes.

0 comments on commit a3d2792

Please sign in to comment.