use of org.apereo.cas.ticket.queue.UpdateTicketMessageQueueCommand in project cas by apereo.
the class JmsTicketRegistry method updateTicket.
@Override
public Ticket updateTicket(final Ticket ticket) throws Exception {
val result = super.updateTicket(ticket);
LOGGER.trace("Publishing update command for id [{}] and ticket [{}]", id, ticket.getId());
ticketPublisher.publishMessageToQueue(new UpdateTicketMessageQueueCommand(id, ticket));
return result;
}
use of org.apereo.cas.ticket.queue.UpdateTicketMessageQueueCommand in project cas by apereo.
the class UpdateTicketMessageQueueCommandTests method verifyUpdateTicket.
@Test
public void verifyUpdateTicket() throws Exception {
var ticket = new TicketGrantingTicketImpl("TGT", CoreAuthenticationTestUtils.getAuthentication(), NeverExpiresExpirationPolicy.INSTANCE);
val cmd = new UpdateTicketMessageQueueCommand(new PublisherIdentifier(), ticket);
cmd.execute(ticketRegistry.getObject());
ticket = ticketRegistry.getObject().getTicket(ticket.getId(), ticket.getClass());
assertNotNull(ticket);
assertEquals("TGT", ticket.getId());
}
Aggregations