org.jwarp.service.security
Interface ITicket

All Known Implementing Classes:
Ticket

public interface ITicket

This is the central ticket interface. A ticket is returned by the security service as service access unit. Tickets can expire after a while (e.g. for Administrator tickets). Always they should expire after a certain time of no usage. There are also different implementation location. A ticket can firstly directly denied by the target security service or also can be denied by the ticket itself. The security class itself should check for a different implementation class to prevent wrapping of the security ticket.


Method Summary
 IContext getContext()
          Return the context identifier.
 long getExpireTime()
          Returns the expire time of the ticket or -1 if the ticket can not expire.
 int getID()
          Returns the user id of the user logged in.
 long getLoginDate()
          Returns the creation time of this ticket.
 long getMagic()
          Return a magic number.
 boolean hasExpired()
          Return true if this ticket has expired.
 

Method Detail

getLoginDate

public long getLoginDate()
Returns the creation time of this ticket.
Returns:
The creation date

getExpireTime

public long getExpireTime()
Returns the expire time of the ticket or -1 if the ticket can not expire. This expiry date can change depending no the actual actions and usage. Corresponding new values must be set over the underlying implementation class.
Returns:
The expiry date

hasExpired

public boolean hasExpired()
Return true if this ticket has expired.
Returns:
true if expired

getID

public int getID()
Returns the user id of the user logged in.
Returns:
The user id

getContext

public IContext getContext()
Return the context identifier.
Returns:
The underlying service context's name

getMagic

public long getMagic()
Return a magic number. This number is used to control the access with a ticket. New values must be set by the security system and can not be overridden.
Returns:
The magic number of this ticket

©   O R C A   S y s t e m s