mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 15:35:49 +01:00
added logout method
This commit is contained in:
@@ -43,6 +43,27 @@ import javax.ws.rs.core.Response;
|
||||
public class AuthenticationResource
|
||||
{
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GET
|
||||
@Path("logout")
|
||||
public Response logout(@Context HttpServletRequest request,
|
||||
@Context HttpServletResponse response)
|
||||
{
|
||||
securityContext.logout(request, response);
|
||||
|
||||
return Response.ok().build();
|
||||
}
|
||||
|
||||
//~--- get methods ----------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
@@ -55,6 +76,7 @@ public class AuthenticationResource
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("login")
|
||||
public ScmState getState(@Context HttpServletRequest request,
|
||||
@Context HttpServletResponse response,
|
||||
@FormParam("username") String username,
|
||||
|
||||
Reference in New Issue
Block a user