3.4. Swift 验证用户

要对用户进行身份验证,请在标题中创建一个包含 X-Auth-UserX-Auth-Key 的请求。

语法

GET /auth HTTP/1.1
Host: swift.example.com
X-Auth-User: johndoe
X-Auth-Key: R7UUOLFDI2ZI9PRCQ53K

响应示例

HTTP/1.1 204 No Content
Date: Mon, 16 Jul 2012 11:05:33 GMT
Server: swift
X-Storage-Url: https://swift.example.com
X-Storage-Token: UOlCCC8TahFKlWuv9DB09TWHF0nDjpPElha0kAa
Content-Length: 0
Content-Type: text/plain; charset=UTF-8

注意

您可以通过在身份验证过程中使用 X-Storage-Url 值执行 GET 请求来检索有关 Ceph Swift 兼容服务的数据。

其它资源