Commit daf0f947 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

logout API call is documented

parent f5eb641f
......@@ -18,11 +18,21 @@ include::{snippets}/authentication/login/request-parameters.adoc[]
==== Response Fields
include::{snippets}/authentication/login/response-fields.adoc[]
==== Sample Request
include::{snippets}/authentication/login/http-request.adoc[]
==== Sample Response
include::{snippets}/authentication/login/response-body.adoc[]
=== Logout
Logout from the system.
==== CURL sample
include::{snippets}/authentication/logout/curl-request.adoc[]
==== Response Fields
include::{snippets}/authentication/logout/response-fields.adoc[]
==== Sample Response
include::{snippets}/authentication/login/http-response.adoc[]
include::{snippets}/authentication/logout/response-body.adoc[]
=== Check if session is still valid
......@@ -34,9 +44,6 @@ 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[]
include::{snippets}/authentication/isSessionValid/response-body.adoc[]
......@@ -145,4 +145,19 @@ public class UserControllerAnonymousIntegrationTest extends ControllerIntegratio
.andExpect(status().is2xxSuccessful());
}
@Test
public void testLogout() throws Exception {
MockHttpSession session = createSession(TEST_ADMIN_LOGIN, TEST_ADMIN_PASSWORD);
RequestBuilder request = post("/api/doLogout")
.session(session);
mockMvc.perform(request)
.andDo(document("authentication/logout",
responseFields(
fieldWithPath("status")
.description("status message"))))
.andExpect(status().is2xxSuccessful());
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment