Package org.apereo.cas.mgmt
Class SessionsController
- java.lang.Object
-
- org.apereo.cas.mgmt.SessionsController
-
@RestController @RequestMapping(path="api/sessions", produces="application/json") public class SessionsController extends java.lang.ObjectREST API for session info for the /dashboard endpoint.- Since:
- 6.0
-
-
Constructor Summary
Constructors Constructor Description SessionsController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbulkRevoke(org.springframework.security.core.Authentication authentication, java.util.List<java.lang.String> tgts)Method to revoke all sessions by user.org.apereo.cas.mgmt.domain.SsoSessionResponsegetSession(java.lang.String user, org.springframework.security.core.Authentication authentication)Looks up SSO sessions in the CAS cluster based on the passed user id.org.apereo.cas.mgmt.domain.SsoSessionResponsegetUserSession(org.springframework.security.core.Authentication authentication)Retrieves the sessions of the logged in user.voidrevokeAll(org.springframework.security.core.Authentication authentication)Method to revoke all sessions by user.voidrevokeSession(java.lang.String tgt, java.lang.String user, org.springframework.security.core.Authentication authentication)Deletes a users sso session based on the passed tgt string.
-
-
-
Method Detail
-
getUserSession
@GetMapping public org.apereo.cas.mgmt.domain.SsoSessionResponse getUserSession(org.springframework.security.core.Authentication authentication) throws java.lang.IllegalAccessExceptionRetrieves the sessions of the logged in user.- Parameters:
authentication- - the user- Returns:
- - SsoSessionResponse
- Throws:
java.lang.IllegalAccessException- - insufficient permissions
-
getSession
@GetMapping("{user}") public org.apereo.cas.mgmt.domain.SsoSessionResponse getSession(@PathVariable java.lang.String user, org.springframework.security.core.Authentication authentication) throws java.lang.IllegalAccessExceptionLooks up SSO sessions in the CAS cluster based on the passed user id.- Parameters:
user- - the user regexp queryauthentication- - the user- Returns:
- - SsoSessionResponse
- Throws:
java.lang.IllegalAccessException- - Illegal Access
-
revokeSession
@DeleteMapping("{tgt}") public void revokeSession(@PathVariable java.lang.String tgt, @RequestParam java.lang.String user, org.springframework.security.core.Authentication authentication) throws java.lang.IllegalAccessExceptionDeletes a users sso session based on the passed tgt string.- Parameters:
tgt- - th tgt iduser- - the user searched forauthentication- - the user- Throws:
java.lang.IllegalAccessException- - Illegal Access
-
revokeAll
@GetMapping("revokeAll") @ResponseStatus(OK) public void revokeAll(org.springframework.security.core.Authentication authentication)Method to revoke all sessions by user.- Parameters:
authentication- - the request
-
bulkRevoke
@PostMapping("bulkRevoke") @ResponseStatus(OK) public void bulkRevoke(org.springframework.security.core.Authentication authentication, @RequestBody java.util.List<java.lang.String> tgts)Method to revoke all sessions by user.- Parameters:
authentication- - the usertgts- - List of TGT ids to revoke
-
-