Authentication#
Login#
- URL:
/doLogin - Method: POST
- Parameters:
login- user login, ‘anonymous’ can be used for accessing API with guest account access levelpassword- user password, for guest account this field is optional
- Output. If login operation is successful then
MINERVA_AUTH_TOKENcookie will be created with authentication token. If credentials are invalid response with403status code will be returned. Token will be valid for the next 120 minutes. - Example:
curl -X POST -c - --data "login=anonymous&password=" \
https://minerva-dev.lcsb.uni.lu/minerva/api/doLogin
Logout#
- URL:
/doLogout - Method: POST
- Parameters: NONE
- Example:
curl -X POST --data "" --cookie "MINERVA_AUTH_TOKEN=xxxxxx" \
https://minerva-dev.lcsb.uni.lu/minerva/api/doLogout
Check if user is authenticated#
Sometimes there is need for verification if user is authenticated in the current session (for instance we might need this information to check if our session did not expire). This API call provides this information.
- URL:
/users/isSessionValid - Method: GET
- Parameters: NONE
- Example:
curl -X GET --data "" --cookie "MINERVA_AUTH_TOKEN=xxxxxx" \
https://minerva-dev.lcsb.uni.lu/minerva/users/isSessionValid