Confirmed users
358
edits
Line 17: | Line 17: | ||
== Authentication == | == Authentication == | ||
To access the storage service, a client device must authenticate by | To access the storage service, a client device must authenticate by POSTing a BrowserID assertion and a device identifier to a well-known server entry-point. It will receive in exchange: | ||
* | * a URL to which further requests should be directed | ||
* a short-lived id/key pair that can be used to authenticate subsequent requests with Hawk | * a short-lived id/key pair that can be used to authenticate subsequent requests with Hawk | ||
* | * the current metadata info for each collection | ||
You can think of this as establishing a "login session" with the server | You can think of this as establishing a "login session" with the server. We're also tunneling some basic metadata in order to reduce the number of round-trips. | ||
Example: | Example: | ||
Line 41: | Line 40: | ||
< "key": <hawk auth secret key>, | < "key": <hawk auth secret key>, | ||
< "collections": { | < "collections": { | ||
< " | < "XXXXX": { | ||
< " | < "version": <version id for this collection>, | ||
< "keyid": <key id for this collection> | |||
< }, | |||
< "YYYYY": { | |||
< "version": <version id for this collection>, | |||
< "keyid": <key id for this collection>, | |||
< "details": <details map for this collection> | |||
< }, | |||
< <...etc...> | < <...etc...> | ||
< } | < } |