Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
minerva
core
Commits
f5eb641f
Commit
f5eb641f
authored
Dec 19, 2019
by
Piotr Gawron
Browse files
information about isSessionValid API call is autogenerated
parent
7926c81c
Changes
2
Hide whitespace changes
Inline
Side-by-side
web/src/main/asciidoc/authentication.adoc
View file @
f5eb641f
...
...
@@ -24,3 +24,19 @@ include::{snippets}/authentication/login/http-request.adoc[]
==== Sample Response
include::{snippets}/authentication/login/http-response.adoc[]
=== Check if session is still valid
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.
==== CURL sample
include::{snippets}/authentication/isSessionValid/curl-request.adoc[]
==== Response Fields
include::{snippets}/authentication/isSessionValid/response-fields.adoc[]
==== Sample Request
include::{snippets}/authentication/isSessionValid/http-request.adoc[]
==== Sample Response
include::{snippets}/authentication/isSessionValid/http-response.adoc[]
web/src/test/java/lcsb/mapviewer/web/UserControllerAnonymousIntegrationTest.java
View file @
f5eb641f
...
...
@@ -103,7 +103,12 @@ public class UserControllerAnonymousIntegrationTest extends ControllerIntegratio
String
response
=
mockMvc
.
perform
(
request
)
.
andExpect
(
status
().
is2xxSuccessful
())
.
andDo
(
document
(
"authentication/isSessionValid"
,
responseFields
(
fieldWithPath
(
"login"
)
.
description
(
"user login of the session owner"
))))
.
andReturn
().
getResponse
().
getContentAsString
();
String
login
=
new
JsonParser
()
.
parse
(
response
)
.
getAsJsonObject
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment