Not logged in : Login |
ODS allows to register new accounts in several ways, ranging from simple a username/password combination to registration through an existing Twitter account. Some registration methods such as the registration via OAuth or OpenID requires more than one step. This function is used for classicaly username/password registration. Other registration methods like WebID, OpenID, or any OAuth-based service are supported through the register action in user.authenticate.authenticationUrl() and user.authenticate.webid().For security reasons it is highly recommended to perform any registration calls through a secure connection.Registration via username and password is as easy as calling user.register() with the name, password, and email parameters filled. If the name is not in use yet and the email address is either unique or ODS has been configured to allow non-unique email addresses, then a new user account will be created which can immediately be used for ODS Authentication.Post RegistrationODS accounts which have not beed created with a classical password have a random password which can be changed later on via user.password.change() to enable classical Password Hash Authentication. In addition any of the supported registration and authentication methods can be added to an existing account at any time through the user.update() or user.update.fields() functions.
name
The user name for the new account.
password
The password for the new account.
email
The email address for the new account.
mode
deprecated
data
deprecated
On success a new user session as detailed in Example User Session: is returned which can be used as described in Authentication via Session Id. On error an appropriate HTTP status code is set and an error message as detailed in ODS Error Result Codes is returned.
Authentication via OAuth
Example:
$ curl -i "http://www.iodbc.org/ods/api/user.register?name=test123&password=1&email=test@yahoo.com"
HTTP/1.1 200 OK
Server: Virtuoso/05.12.3041 (Solaris) x86_64-sun-solaris2.10-64 VDB
Connection: Keep-Alive
Date: Mon, 28 Dec 2009 22:18:59 GMT
Accept-Ranges: bytes
Content-Type: text/xml; charset="ISO-8859-1"
Content-Length: 59
Attributes | Values |
---|---|
rdf:type | |
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 |
On success a new user session as detailed in Example User Session: is returned which can be used as described in Authentication via Session Id. On error an appropriate HTTP status code is set and an error message as detailed in ODS Error Result Codes is returned. $ curl -i "http://www.iodbc.org/ods/api/user.register?name=test123&password=1&email=test@yahoo.com" HTTP/1.1 200 OK Server: Virtuoso/05.12.3041 (Solaris) x86_64-sun-solaris2.10-64 VDB Connection: Keep-Alive Date: Mon, 28 Dec 2009 22:18:59 GMT Accept-Ranges: bytes Content-Type: text/xml; charset="ISO-8859-1" Content-Length: 59 <userSession> <sid>1de236f5da2f32d92e8c0cce5053a96e</sid> <user> <uname>test123</uname> <uid>132</uid> <new>1</new> <dba>0</dba> </user> </userSession> This function does not require any authentication. |
schema:url | |
is schema:target of |