authentication.adoc 1.4 KB
Newer Older
1
= Rest API Documentation - Authentication
Piotr Gawron's avatar
Piotr Gawron committed
2
minerva
3
4
5
6
v{project-version} {build-time}
:toc: left
:sectnums:

7
== Login
8
9
Login to the system. If credentials are invalid response with 403 status code will be returned. Token will be valid for the next 120 minutes.

10
=== CURL sample
11
12
include::{snippets}/authentication/login/curl-request.adoc[]

13
=== Request Parameters
14
15
include::{snippets}/authentication/login/request-parameters.adoc[]

16
=== Response Fields
17
18
include::{snippets}/authentication/login/response-fields.adoc[]

19
=== Sample Response
Piotr Gawron's avatar
Piotr Gawron committed
20
21
22
include::{snippets}/authentication/login/response-body.adoc[]


23
== Logout
Piotr Gawron's avatar
Piotr Gawron committed
24
25
Logout from the system.

26
=== CURL sample
Piotr Gawron's avatar
Piotr Gawron committed
27
28
include::{snippets}/authentication/logout/curl-request.adoc[]

29
=== Response Fields
Piotr Gawron's avatar
Piotr Gawron committed
30
include::{snippets}/authentication/logout/response-fields.adoc[]
31

32
=== Sample Response
Piotr Gawron's avatar
Piotr Gawron committed
33
include::{snippets}/authentication/logout/response-body.adoc[]
34

35

36
== Check if session is still valid
37
38
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 returns information if the session is still valid.

39
=== CURL sample
40
41
include::{snippets}/authentication/isSessionValid/curl-request.adoc[]

42
=== Response Fields
43
44
include::{snippets}/authentication/isSessionValid/response-fields.adoc[]

45
=== Sample Response
Piotr Gawron's avatar
Piotr Gawron committed
46
include::{snippets}/authentication/isSessionValid/response-body.adoc[]
47