...
Code Block |
---|
HTTP/1.1 204 NO CONTENT |
Authentication via OpenID
Synapse supports authentication via OpenID. Specifically there is a service which performs the OpenID handshake and, upon success, logs the user into Synapse and returns a Synapse session token. The basic request is:
Code Block |
---|
POST https://synapse.sagebase.org/Portal/openid?OPEN_ID_PROVIDER=<OpenIDEndpoint>&RETURN_TO_URL=<RedirectURL>
|
The successful response is a redirect to <RedirectURL>:<sessonToken>.
To authenticate against Google's OpenID endpoint, the command is:
Code Block |
---|
POST https://synapse.sagebase.org/Portal/openid?OPEN_ID_PROVIDER=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid&RETURN_TO_URL=<RedirectURL>
|
If unsuccessful the response is ????.
If successful, but if the user has not yet accepted the Synapse Terms of Use (ToU), the response is ????.
In the case that the user does not accept the ToU, then authentication must be repeated with explict ToU acceptance:
Code Block |
---|
https://synapse.sagebase.org/Portal/openid?OPEN_ID_PROVIDER=<OpenIDEndpoint>&acceptsTermsOfUse=true&RETURN_TO_URL=<RedirectURL>
|
Sample commands, issued from cURL:
...
Access repository services with HMAC-SHA1 signed request:
curl -i -H "Content-Type:application/json" -H "Accept:application/json" -H signatureTimestamp:2011-09-27T21:59:22.371-07:00 -H signature:yhMgokIH9ErQklj8oUuhHR5o5QM= -H userId:demouser@sagebase.org -X GET "http://localhost:8080/services-repository-0.7-SNAPSHOT/repo/v1/dataset?sort=name&limit=3"
Authentication of Requests to Platform
Authentication via Session Token
Requests shall include a header named "sessionToken" whose value is that returned by the Initiate Session request, above. (The session will timeout eventually, with a nominal duration of 24 hours.)
Authentication via Secret Key
Request shall include the following headers:
...
then the URI is:
/repo/v1/dataset
Authentication Failure
For requests that fail to be authenticated the response will include the headers:
...