@RestController(value="ticketResourceRestController")
public class TicketsResource
extends java.lang.Object
RestController implementation of CAS' REST API.
This class implements main CAS RESTful resource for vending/deleting TGTs and vending STs:
POST /v1/ticketsPOST /v1/tickets/{TGT-id}GET /v1/tickets/{TGT-id}DELETE /v1/tickets/{TGT-id}| Constructor and Description |
|---|
TicketsResource(org.apereo.cas.authentication.AuthenticationSystemSupport authenticationSystemSupport,
CredentialFactory credentialFactory,
org.apereo.cas.ticket.registry.TicketRegistrySupport ticketRegistrySupport,
org.apereo.cas.authentication.principal.ServiceFactory webApplicationServiceFactory,
org.apereo.cas.CentralAuthenticationService centralAuthenticationService) |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.http.ResponseEntity<java.lang.String> |
createServiceTicket(org.springframework.util.MultiValueMap<java.lang.String,java.lang.String> requestBody,
java.lang.String tgtId)
Create new service ticket.
|
org.springframework.http.ResponseEntity<java.lang.String> |
createTicketGrantingTicket(org.springframework.util.MultiValueMap<java.lang.String,java.lang.String> requestBody,
javax.servlet.http.HttpServletRequest request)
Create new ticket granting ticket.
|
org.springframework.http.ResponseEntity<java.lang.String> |
deleteTicketGrantingTicket(java.lang.String tgtId)
Destroy ticket granting ticket.
|
org.springframework.http.ResponseEntity<java.lang.String> |
getTicketStatus(java.lang.String id)
Determine the status of a given ticket id, whether it's valid, exists, expired, etc.
|
public TicketsResource(org.apereo.cas.authentication.AuthenticationSystemSupport authenticationSystemSupport,
CredentialFactory credentialFactory,
org.apereo.cas.ticket.registry.TicketRegistrySupport ticketRegistrySupport,
org.apereo.cas.authentication.principal.ServiceFactory webApplicationServiceFactory,
org.apereo.cas.CentralAuthenticationService centralAuthenticationService)
@PostMapping(value="/v1/tickets",
consumes="application/x-www-form-urlencoded")
public org.springframework.http.ResponseEntity<java.lang.String> createTicketGrantingTicket(@RequestBody
org.springframework.util.MultiValueMap<java.lang.String,java.lang.String> requestBody,
javax.servlet.http.HttpServletRequest request)
throws com.fasterxml.jackson.core.JsonProcessingException
requestBody - username and password application/x-www-form-urlencoded valuesrequest - raw HttpServletRequest used to call this methodcom.fasterxml.jackson.core.JsonProcessingException - in case of JSON parsing failure@GetMapping(value="/v1/tickets/{id:.+}")
public org.springframework.http.ResponseEntity<java.lang.String> getTicketStatus(@PathVariable(value="id")
java.lang.String id)
id - ticket idResponseEntity representing RESTful response@PostMapping(value="/v1/tickets/{tgtId:.+}",
consumes="application/x-www-form-urlencoded")
public org.springframework.http.ResponseEntity<java.lang.String> createServiceTicket(@RequestBody
org.springframework.util.MultiValueMap<java.lang.String,java.lang.String> requestBody,
@PathVariable(value="tgtId")
java.lang.String tgtId)
requestBody - service application/x-www-form-urlencoded valuetgtId - ticket granting ticket id URI path paramResponseEntity representing RESTful response@DeleteMapping(value="/v1/tickets/{tgtId:.+}")
public org.springframework.http.ResponseEntity<java.lang.String> deleteTicketGrantingTicket(@PathVariable(value="tgtId")
java.lang.String tgtId)
tgtId - ticket granting ticket id URI path paramResponseEntity representing RESTful response. Signals
HttpStatus.OK when successful.