5 Swift API requests that require authentication must contain an
6 ``X-Storage-Token`` authentication token in the request header.
7 The token may be retrieved from RADOS Gateway, or from another authenticator.
8 To obtain a token from RADOS Gateway, you must create a user. For example::
10 sudo radosgw-admin user create --subuser="{username}:{subusername}" --uid="{username}"
11 --display-name="{Display Name}" --key-type=swift --secret="{password}" --access=full
13 For details on RADOS Gateway administration, see `radosgw-admin`_.
15 .. _radosgw-admin: ../../../man/8/radosgw-admin/
20 To authenticate a user, make a request containing an ``X-Auth-User`` and a
21 ``X-Auth-Key`` in the header.
29 Host: swift.radosgwhost.com
31 X-Auth-Key: R7UUOLFDI2ZI9PRCQ53K
38 :Description: The key RADOS GW username to authenticate.
44 :Description: The key associated to a RADOS GW username.
52 The response from the server should include an ``X-Auth-Token`` value. The
53 response may also contain a ``X-Storage-Url`` that provides the
54 ``{api version}/{account}`` prefix that is specified in other requests
55 throughout the API documentation.
60 :Description: The authorization token for the ``X-Auth-User`` specified in the request.
66 :Description: The URL and ``{api version}/{account}`` path for the user.
69 A typical response looks like this::
71 HTTP/1.1 204 No Content
72 Date: Mon, 16 Jul 2012 11:05:33 GMT
74 X-Storage-Url: https://swift.radosgwhost.com/v1/ACCT-12345
75 X-Auth-Token: UOlCCC8TahFKlWuv9DB09TWHF0nDjpPElha0kAa
77 Content-Type: text/plain; charset=UTF-8