Draft 2015-05-27
Endpoint: /tpen?config
Method: GET
Request body: none
Response content-type: application/json
Response body: {"tpen":"http://t-pen.org/TPEN"}
Status: 200 on success.
Comments: This method is used to retrieve the address of the T-PEN server being used by Tradamus, as configured in Tradamus' web.xml.
Endpoint: /tpen
Method: GET or POST (as appropriate)
Comments: Special endpoint for proxying calls to T-PEN. The portion of the request following /tpen will be forwarded to the T-PEN instance configured in the "server" init-param entry of the Tradamus web.xml file. Has been tested with the following T-PEN endpoints:
GET /tpen/login
GET /tpen/projects
GET /tpen/project/projID
Authentication can be done in two ways: by cookie or by white-list.
In the cookie method, first call the T-PEN login endpoint to get a JSESSIONID cookie and pass that to subsequent calls.
The white-list method depends on the Tradamus user-name (typically an email address) also existing in T-PEN. The line TRADAMUS=TradamusIPAddress must be added to the T-PEN version.properties file, to tell T-PEN that requests from that Tradamus instance are allowed to bypass the usual T-PEN login process.