Skip to content
aphreet edited this page Sep 19, 2012 · 2 revisions

By default all operations are performed in the 'anonymous' domain. In order to change a working domain you must provide following HTTP headers with HTTP request:

x-c3-domain: plab

x-c3-sign: 505b94fbc3e78dad2287819aeaa1285f8499b3b3d6c2a9cc2a932fe1c8f650a6

x-c3-date: Sun, 13 Mar 2011 23:37:51 MSK

  • The first one is domain name
  • The second one is digest calculated using following algorithm:

hmac("sha256", $secret, $url + $currentDate +$domainName)

where $secret is a secret key, $url - resource url, $currentDate - current date, in the same format as in x-c3-date, domainName - the name of the domain, the same as in x-c3-domain header

Example: hmac("sha256", "secret_key", "/rest/fs/directory/file.txtSun, 13 Mar 2011 23:37:51 MSKplab") = "ee358e0b804ae5b18bc3ecf3924bee7dbc1c01425ab48e3dcb1990a038d2ea70"

Clone this wiki locally