use of org.apereo.cas.ticket.queue.DeleteTicketMessageQueueCommand in project cas by apereo.
the class DeleteTicketMessageQueueCommandTests method verifyDeleteTicket.
@Test
public void verifyDeleteTicket() throws Exception {
val ticket = new TicketGrantingTicketImpl("TGT", CoreAuthenticationTestUtils.getAuthentication(), NeverExpiresExpirationPolicy.INSTANCE);
ticketRegistry.getObject().addTicket(ticket);
val cmd = new DeleteTicketMessageQueueCommand(new PublisherIdentifier(), ticket.getId());
cmd.execute(ticketRegistry.getObject());
assertTrue(ticketRegistry.getObject().getTickets().isEmpty());
}
use of org.apereo.cas.ticket.queue.DeleteTicketMessageQueueCommand in project cas by apereo.
the class JmsTicketRegistry method deleteSingleTicket.
@Override
public boolean deleteSingleTicket(final String ticketId) {
val result = super.deleteSingleTicket(ticketId);
LOGGER.trace("Publishing delete command for id [{}] and ticket [{}]", id, ticketId);
ticketPublisher.publishMessageToQueue(new DeleteTicketMessageQueueCommand(id, ticketId));
return result;
}
Aggregations