Not logged in : Login |
ODS supports a variety of authentication methods. The most common way of operation for a client is to obtain a session ID and use it in subsequent calls to the API as described in Authentication via Session Id. Session IDs are obtained in one of the following ways. This method allows to authenticate via classical user digest information (user name and password). Authentication through third-party services is handled by user.authenticate.authenticationUrl(). user.authenticate.webid() handles WebiD (X.509 client SSL certificate authentication). In contrast to the other methods user.authenticate.authenticationUrl() will return a URL the client needs to navigate the user to in order to complete the authentication. The other methods will return a session ID.A session will timeout after being unused for half an hour.
Authentication via Password Hash
When authenticating via password hashes parameters user_name and password_hash need to be specified. The password hash uses the sha1 digest algorithm and includes both the user name and the password.This can be created via openssl or any sha1 tool available in the environment of the client: #echo-n"demofoobar"|openssldgst-sha1
#echo-n"demofoobar"|sha1sum
user_name
The user name of the account created via user.register(). If specified password_hash also needs to be provided.
password_hash
The password hash as explained in Password Hash Authentication. Mandatory if user_name is specified.
facebookUID
Deprecated Use user.authenticate.authenticationUrl() for Facebook login.
openIdUrl
Deprecated Use user.authenticate.authenticationUrl() for OpenID login.
openIdIdentity
Deprecated Use user.authenticate.authenticationUrl() for OpenID login.
oauthMode
Deprecated Use user.authenticate.authenticationUrl() for OAuth login.
oauthSid
Deprecated Use user.authenticate.authenticationUrl() for OAuth login.
oauthVerifier
Deprecated Use user.authenticate.authenticationUrl() for OAuth login.
oauthToken
Deprecated Use user.authenticate.authenticationUrl() for OAuth login.
An XML stream containing the session id of the newly created session. This session id can then be used to authenticate other method calls as explained in Authentication via Session Id. For an example of a user session object see Example User Session:.
Authentication via OAuth, user.authenticate.webid(), user.authenticate.authenticationUrl()
Example:
$ curl -i "http://ods.openlinksw.com/ods/api/user.authenticate?user_name=demo&password_hash=49e473da03fbc286f06b5f0bf1f3301b5e4a67fd"
HTTP/1.1 200 OK
Server: Virtuoso/06.01.3127 (Linux) x86_64-unknown-linux-gnu
Connection: Keep-Alive
Date: Tue, 17 Apr 2012 09:31:34 GMT
Accept-Ranges: bytes
Content-Type: text/xml; charset="UTF-8"
Content-Length: 114
Attributes | Values |
---|---|
type | |
schema:url | |
schema:httpMethod |
|
schema:contentType |
|
http://www.openlin...es#isWebServiceOf | |
http://www.openlin...vices#endPointURL | |
schema:shortDescription |
|
http://www.openlin...ices#hasParameter | |
schema:name |
|
schema:description |
An XML stream containing the session id of the newly created session. This session id can then be used to authenticate other method calls as explained in Authentication via Session Id. For an example of a user session object see Example User Session:. Authentication via OAuth, user.authenticate.webid(), user.authenticate.authenticationUrl() $ curl -i "http://ods.openlinksw.com/ods/api/user.authenticate?user_name=demo&password_hash=49e473da03fbc286f06b5f0bf1f3301b5e4a67fd" HTTP/1.1 200 OK Server: Virtuoso/06.01.3127 (Linux) x86_64-unknown-linux-gnu Connection: Keep-Alive Date: Tue, 17 Apr 2012 09:31:34 GMT Accept-Ranges: bytes Content-Type: text/xml; charset="UTF-8" Content-Length: 114 <userSession> <sid>1de236f5da2f32d92e8c0cce5053a96e</sid> <user> <uname>demo</uname> <uid>127</uid> <new>0</new> <dba>0</dba> </user> </userSession> This function requries authentication via one of the supported authentication methods as described in ODS Authentication. |
is schema:target of |