Command doc: access token
Change-Id: I1b7103e28273f0a63c7d6b6003317b9e69702b05
This commit is contained in:
parent
d9c217e5bc
commit
d2943d2592
42
doc/source/command-objects/access-token.rst
Normal file
42
doc/source/command-objects/access-token.rst
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
============
|
||||||
|
access token
|
||||||
|
============
|
||||||
|
|
||||||
|
Identity v3
|
||||||
|
|
||||||
|
`Requires: OS-OAUTH1 extension`
|
||||||
|
|
||||||
|
access token create
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
Create an access token
|
||||||
|
|
||||||
|
.. program:: access token create
|
||||||
|
.. code:: bash
|
||||||
|
|
||||||
|
os access token create
|
||||||
|
--consumer-key <consumer-key>
|
||||||
|
--consumer-secret <consumer-secret>
|
||||||
|
--request-key <request-key>
|
||||||
|
--request-secret <request-secret>
|
||||||
|
--verifier <verifier>
|
||||||
|
|
||||||
|
.. option:: --consumer-key <consumer-key>
|
||||||
|
|
||||||
|
Consumer key (required)
|
||||||
|
|
||||||
|
.. option:: --consumer-secret <consumer-secret>
|
||||||
|
|
||||||
|
Consumer secret (required)
|
||||||
|
|
||||||
|
.. option:: --request-key <request-key>
|
||||||
|
|
||||||
|
Request token to exchange for access token (required)
|
||||||
|
|
||||||
|
.. option:: --request-secret <request-secret>
|
||||||
|
|
||||||
|
Secret associated with <request-key> (required)
|
||||||
|
|
||||||
|
.. option:: --verifier <verifier>
|
||||||
|
|
||||||
|
Verifier associated with <request-key> (required)
|
@ -69,7 +69,7 @@ overlapping purposes there will be options to select which object to use, or
|
|||||||
the API resources will be merged, as in the ``quota`` object that has options
|
the API resources will be merged, as in the ``quota`` object that has options
|
||||||
referring to both Compute and Volume quotas.
|
referring to both Compute and Volume quotas.
|
||||||
|
|
||||||
* ``access token``: Identity - long-lived OAuth-based token
|
* ``access token``: (**Identity**) long-lived OAuth-based token
|
||||||
* ``availability zone``: (**Compute**) a logical partition of hosts or volume services
|
* ``availability zone``: (**Compute**) a logical partition of hosts or volume services
|
||||||
* ``aggregate``: (**Compute**) a grouping of servers
|
* ``aggregate``: (**Compute**) a grouping of servers
|
||||||
* ``backup``: (**Volume**) a volume copy
|
* ``backup``: (**Volume**) a volume copy
|
||||||
|
@ -69,7 +69,7 @@ class AuthorizeRequestToken(show.ShowOne):
|
|||||||
|
|
||||||
|
|
||||||
class CreateAccessToken(show.ShowOne):
|
class CreateAccessToken(show.ShowOne):
|
||||||
"""Create access token"""
|
"""Create an access token"""
|
||||||
|
|
||||||
log = logging.getLogger(__name__ + '.CreateAccessToken')
|
log = logging.getLogger(__name__ + '.CreateAccessToken')
|
||||||
|
|
||||||
@ -78,31 +78,31 @@ class CreateAccessToken(show.ShowOne):
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--consumer-key',
|
'--consumer-key',
|
||||||
metavar='<consumer-key>',
|
metavar='<consumer-key>',
|
||||||
help='Consumer key',
|
help='Consumer key (required)',
|
||||||
required=True
|
required=True
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--consumer-secret',
|
'--consumer-secret',
|
||||||
metavar='<consumer-secret>',
|
metavar='<consumer-secret>',
|
||||||
help='Consumer secret',
|
help='Consumer secret (required)',
|
||||||
required=True
|
required=True
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--request-key',
|
'--request-key',
|
||||||
metavar='<request-key>',
|
metavar='<request-key>',
|
||||||
help='Request token key',
|
help='Request token to exchange for access token (required)',
|
||||||
required=True
|
required=True
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--request-secret',
|
'--request-secret',
|
||||||
metavar='<request-secret>',
|
metavar='<request-secret>',
|
||||||
help='Request token secret',
|
help='Secret associated with <request-key> (required)',
|
||||||
required=True
|
required=True
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--verifier',
|
'--verifier',
|
||||||
metavar='<verifier>',
|
metavar='<verifier>',
|
||||||
help='Verifier Pin',
|
help='Verifier associated with <request-key> (required)',
|
||||||
required=True
|
required=True
|
||||||
)
|
)
|
||||||
return parser
|
return parser
|
||||||
@ -114,9 +114,7 @@ class CreateAccessToken(show.ShowOne):
|
|||||||
parsed_args.consumer_key, parsed_args.consumer_secret,
|
parsed_args.consumer_key, parsed_args.consumer_secret,
|
||||||
parsed_args.request_key, parsed_args.request_secret,
|
parsed_args.request_key, parsed_args.request_secret,
|
||||||
parsed_args.verifier)
|
parsed_args.verifier)
|
||||||
info = {}
|
return zip(*sorted(six.iteritems(access_token._info)))
|
||||||
info.update(access_token._info)
|
|
||||||
return zip(*sorted(six.iteritems(info)))
|
|
||||||
|
|
||||||
|
|
||||||
class CreateRequestToken(show.ShowOne):
|
class CreateRequestToken(show.ShowOne):
|
||||||
|
Loading…
Reference in New Issue
Block a user