The CAS 3.5 API's will actually have a purge method :-)
On Wed, Sep 22, 2010 at 12:09 PM, Robert Oschwald < [email protected]> wrote: > Hi Folks, > > as I use remember-me, I need to be able to force a relogin of all users > (e.g. if Terms Of Service change). > > For this, I added a deleteAllTgts() method to the > CentralAuthenticationServiceImpl class (using maven overlay) to be able to > force a relogin of all users (triggered via a REST call in my own > controller). > Does anybody have a concern about this approach? > > @Transactional(readOnly = false) > public void deleteAllTgts() { > this.log.info("Removing all TGTs from registry.."); > Collection<Ticket> tickets = this.ticketRegistry.getTickets(); > List<String> ids = new ArrayList<String>(); > for (final Ticket ticket : tickets) { > if (ticket instanceof TicketGrantingTicket){ > ids.add(ticket.getId()); > } > } > ticketsInCache = null; > for (String id : ids) { > if (this.log.isDebugEnabled()) { > this.log.debug("Deleting ticket >" + id + "<"); > } > this.ticketRegistry.deleteTicket(id); > } > } > > Maybe such a function would be useful to CAS. > > > Robert > > -- > You are currently subscribed to [email protected] as: > [email protected] > > To unsubscribe, change settings or access archives, see > http://www.ja-sig.org/wiki/display/JSG/cas-user > > -- You are currently subscribed to [email protected] as: [email protected] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user
