Class SessionRestController
- java.lang.Object
-
- org.neotropic.kuwaiba.northbound.rest.aem.SessionRestController
-
- All Implemented Interfaces:
SessionRestOpenApi
@RestController @RequestMapping("/v2.1.1/session-manager/") public class SessionRestController extends Object implements SessionRestOpenApiSession Manager Rest Controller.- Author:
- Mauricio Ruiz Beltrán <mauricio.ruiz@kuwaiba.org>
-
-
Constructor Summary
Constructors Constructor Description SessionRestController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcloseSession(String sessionId)Closes a session.SessioncreateSession(String user, String password, int sessionType)Creates a session.
-
-
-
Field Detail
-
PATH
public static final String PATH
Path that includes the Kuwaiba version and the module id- See Also:
- Constant Field Values
-
-
Method Detail
-
createSession
@RequestMapping(method=PUT, value="createSession/{user}/{password}/{sessionType}", produces="application/json") public Session createSession(@PathVariable("user") String user, @PathVariable("password") String password, @PathVariable("sessionType") int sessionType)Creates a session. System users can not create sessions.- Specified by:
createSessionin interfaceSessionRestOpenApi- Parameters:
user- User name.password- Password.sessionType- The type of session to be created. This type depends on what kind of client is trying to access (a desktop client, a web client, a web service user, etc. See Session.TYPE_XXX for possible session types).- Returns:
- A session object with information about the session itself plus information about the user.
-
closeSession
@RequestMapping(method=DELETE, value="closeSession/{sessionId}", produces="application/json") public void closeSession(@PathVariable("sessionId") String sessionId)Closes a session.- Specified by:
closeSessionin interfaceSessionRestOpenApi- Parameters:
sessionId- The session id (token).
-
-