TNO database webservice : cookies functions

getNewCookie

Create a new authentication cookie and return it. The cookie is inactivated after 30 to 45 min of inactivity but it is recommenced to close it manually when you don't need it anymore.

SOAP

getNewCookie();
Returns the cookie, cookies are case sensitive

REST

GET http://tnodb.obs-besancon.fr/ws/tno/cookie
HTTP return code should be "200". The cookie is returned in the body.

getCookieDetails

Get details of the cookie.

SOAP

getCookieDetails(cookie);
Parameter:
Returns a array containing the list of the user's rights

REST

GET http://tnodb.obs-besancon.fr/ws/tno/cookie/{cookie}
Parameter:
All readable data stored in the cookie. The result is an JSON encoded object.
GET http://tnodb.obs-besancon.fr/ws/tno/cookie/{cookie}/{param}
Parameters in URL:
The value stored in the cookie for the required parameter.

addOSSOStoCookie

This function try to log in OSSOS and add it in authorizations.

SOAP

addOSSOStoCookie(cookie, username, password);
Parameters:
Returns true if authorization granted, false otherwise

REST

POST http://tnodb.obs-besancon.fr/ws/tno/cookie/{cookie}/ossos
Parameter in URL:
Parameters in POST body:
HTTP return code should be "200". If the authorization is granted the body is "1" else authorization has failed. When authorization is failed due to invalid user/pass the return code will be "200" too, check the returned body !

removeCookie

Invalidate the authentication cookie.

SOAP

removeCookie(cookie);
Parameter:
Returns always true

REST

DELETE http://tnodb.obs-besancon.fr/ws/tno/cookie/{cookie}
Parameter:

Back to documentation