Gesendet mit meinem HTC

----- Reply message -----
Von: "Scott Battaglia" <[email protected]>
An: <[email protected]>
Betreff: [cas-user] exception thrown when tickets expire, but expiring seems 
normal
Datum: Di., Aug. 21, 2012 21:44
The WebFlow action is probably logging it.  We can reduce the logging there as 
we don't expect you to do anything with it.
Can you log an improvement issue for that and assign it to me?


ThanksScott

On Tue, Aug 21, 2012 at 11:33 AM, Ken Hohl <[email protected]> wrote:


Every time we try to use an expired ticket.  Code snippet below.  Note the 
block that throws an exception if the ticket is expired.  The problem is that 
nothing seems to catch this exception and deal with it more gracefully than 
logging an error with a full stack.





@Audit(

    action="SERVICE_TICKET",

    actionResolverName="GRANT_SERVICE_TICKET_RESOLVER",

    resourceResolverName="GRANT_SERVICE_TICKET_RESOURCE_RESOLVER")

@Profiled(tag="GRANT_SERVICE_TICKET", logFailuresSeparately = false)

@Transactional(readOnly = false)

public String grantServiceTicket(final String ticketGrantingTicketId, final 
Service service, final Credentials credentials) throws TicketException {



    Assert.notNull(ticketGrantingTicketId, "ticketGrantingticketId cannot be 
null");

    Assert.notNull(service, "service cannot be null");



    final TicketGrantingTicket ticketGrantingTicket;

    ticketGrantingTicket = (TicketGrantingTicket) 
this.ticketRegistry.getTicket(ticketGrantingTicketId, 
TicketGrantingTicket.class);



    if (ticketGrantingTicket == null) {

        throw new InvalidTicketException();

    }



    synchronized (ticketGrantingTicket) {

        if (ticketGrantingTicket.isExpired()) {

            this.ticketRegistry.deleteTicket(ticketGrantingTicketId);

            throw new InvalidTicketException();

        }

    }

--

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] 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

Reply via email to