Currently, the REST API implementation uses only the first secret reservation key passed to it in the getInstance method. This will only work for a non-federated environment. As we want to use the REST API implementation as is for the federator we must modify the API and its implementation. In the future the secret reservation key list is passed in as a URL parameter to every method and the getInstance() method will be removed. This URL parameter is a base64-encoded serialized version of the secret reservation key list.
Example: a JavaScript client retrieved his reservation from the RsResource so he has a list of secret reservation keys:
The REST APIs resources can be reached by attaching a base64-encoded serialized version of that:
var resetRequestUrl = "http://wisebed.itm.uni-luebeck.de/rest/v1.0/experiments/" + base64_encode(JSON.stringify(srks)) + "/reset";
$.ajax(...)
This way the testbed backend can base64-decode and deserialize the list of secret reservation keys and retrieve the reservation from the reservation system if not done yet before. Implementation can be fully stateless. This works in both federated and non-federated environments.
Currently, the REST API implementation uses only the first secret reservation key passed to it in the getInstance method. This will only work for a non-federated environment. As we want to use the REST API implementation as is for the federator we must modify the API and its implementation. In the future the secret reservation key list is passed in as a URL parameter to every method and the getInstance() method will be removed. This URL parameter is a base64-encoded serialized version of the secret reservation key list.
Example: a JavaScript client retrieved his reservation from the RsResource so he has a list of secret reservation keys:
The REST APIs resources can be reached by attaching a base64-encoded serialized version of that:
This way the testbed backend can base64-decode and deserialize the list of secret reservation keys and retrieve the reservation from the reservation system if not done yet before. Implementation can be fully stateless. This works in both federated and non-federated environments.