本文整理汇总了Java中org.jasig.cas.ticket.Ticket类的典型用法代码示例。如果您正苦于以下问题:Java Ticket类的具体用法?Java Ticket怎么用?Java Ticket使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Ticket类属于org.jasig.cas.ticket包,在下文中一共展示了Ticket类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: deleteSingleTicket
import org.jasig.cas.ticket.Ticket; //导入依赖的package包/类
/**
* {@inheritDoc}
* Either the element is removed from the cache
* or it's not found in the cache and is already removed.
* Thus the result of this op would always be true.
*/
@Override
public boolean deleteSingleTicket(final String ticketId) {
final Ticket ticket = getTicket(ticketId);
if (ticket == null) {
logger.debug("Ticket {} cannot be retrieved from the cache", ticketId);
return true;
}
if (this.ticketGrantingTicketsCache.remove(ticket.getId())) {
logger.debug("Ticket {} is removed", ticket.getId());
}
if (this.serviceTicketsCache.remove(ticket.getId())) {
logger.debug("Ticket {} is removed", ticket.getId());
}
return true;
}
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:24,代码来源:EhCacheTicketRegistry.java
示例2: doExecute
import org.jasig.cas.ticket.Ticket; //导入依赖的package包/类
/**
* Determines whether the TGT in the flow request context is valid.
*
* @param requestContext Flow request context.
*
* @throws Exception in case ticket cannot be retrieved from the service layer
* @return {@link #NOT_EXISTS}, {@link #INVALID}, or {@link #VALID}.
*/
@Override
protected Event doExecute(final RequestContext requestContext) throws Exception {
final String tgtId = WebUtils.getTicketGrantingTicketId(requestContext);
if (!StringUtils.hasText(tgtId)) {
return new Event(this, NOT_EXISTS);
}
String eventId = INVALID;
try {
final Ticket ticket = this.centralAuthenticationService.getTicket(tgtId, Ticket.class);
if (ticket != null && !ticket.isExpired()) {
eventId = VALID;
}
} catch (final AbstractTicketException e) {
logger.trace("Could not retrieve ticket id {} from registry.", e);
}
return new Event(this, eventId);
}
开发者ID:yuweijun,项目名称:cas-server-4.2.1,代码行数:27,代码来源:TicketGrantingTicketCheckAction.java
示例3: getTicket
import org.jasig.cas.ticket.Ticket; //导入依赖的package包/类
/**
* {@inheritDoc}
*
* Note:
* Synchronization on ticket object in case of cache based registry doesn't serialize
* access to critical section. The reason is that cache pulls serialized data and
* builds new object, most likely for each pull. Is this synchronization needed here?
*/
@Timed(name = "GET_TICKET_TIMER")
@Metered(name = "GET_TICKET_METER")
@Counted(name="GET_TICKET_COUNTER", monotonic=true)
@Override
public T getTicket(final String ticketId, final Class |