本文整理汇总了Java中org.jasig.cas.ticket.TicketState.getCreationTime方法的典型用法代码示例。如果您正苦于以下问题:Java TicketState.getCreationTime方法的具体用法?Java TicketState.getCreationTime怎么用?Java TicketState.getCreationTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jasig.cas.ticket.TicketState
的用法示例。
在下文中一共展示了TicketState.getCreationTime方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isExpired
import org.jasig.cas.ticket.TicketState; //导入方法依赖的package包/类
@Override
public boolean isExpired(final TicketState ticketState) {
final long currentSystemTimeInMillis = System.currentTimeMillis();
// Ticket has been used, check maxTimeToLive (hard window)
if (currentSystemTimeInMillis - ticketState.getCreationTime() >= maxTimeToLiveInMilliSeconds) {
LOGGER.debug("Ticket is expired because the time since creation is greater than maxTimeToLiveInMilliSeconds");
return true;
}
// Ticket is within hard window, check timeToKill (sliding window)
if (currentSystemTimeInMillis - ticketState.getLastTimeUsed() >= timeToKillInMilliSeconds) {
LOGGER.debug("Ticket is expired because the time since last use is greater than timeToKillInMilliseconds");
return true;
}
return false;
}
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:19,代码来源:TicketGrantingTicketExpirationPolicy.java
示例2: isExpired
import org.jasig.cas.ticket.TicketState; //导入方法依赖的package包/类
@Override
public boolean isExpired(final TicketState ticketState) {
final long currentSystemTimeInMillis = System.currentTimeMillis();
// Ticket has been used, check maxTimeToLive (hard window)
if ((currentSystemTimeInMillis - ticketState.getCreationTime() >= maxTimeToLiveInMilliSeconds)) {
logger.debug("Ticket is expired because the time since creation is greater than maxTimeToLiveInMilliSeconds");
return true;
}
// Ticket is within hard window, check timeToKill (sliding window)
if ((currentSystemTimeInMillis - ticketState.getLastTimeUsed() >= timeToKillInMilliSeconds)) {
logger.debug("Ticket is expired because the time since last use is greater than timeToKillInMilliseconds");
return true;
}
return false;
}
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:19,代码来源:TicketGrantingTicketExpirationPolicy.java
示例3: isExpired
import org.jasig.cas.ticket.TicketState; //导入方法依赖的package包/类
@Override
public boolean isExpired(final TicketState ticketState) {
final long currentSystemTimeInMillis = System.currentTimeMillis();
// Ticket has been used, check maxTimeToLive (hard window)
if ((currentSystemTimeInMillis - ticketState.getCreationTime() >= maxTimeToLiveInMilliSeconds)) {
LOGGER.debug("Ticket is expired because the time since creation is greater than maxTimeToLiveInMilliSeconds");
return true;
}
// Ticket is within hard window, check timeToKill (sliding window)
if ((currentSystemTimeInMillis - ticketState.getLastTimeUsed() >= timeToKillInMilliSeconds)) {
LOGGER.debug("Ticket is expired because the time since last use is greater than timeToKillInMilliseconds");
return true;
}
return false;
}
示例4: isExpired
import org.jasig.cas.ticket.TicketState; //导入方法依赖的package包/类
public boolean isExpired(final TicketState ticketState) {
// Ticket has been used, check maxTimeToLive (hard window)
if ((System.currentTimeMillis() - ticketState.getCreationTime() >= maxTimeToLiveInMilliSeconds)) {
LOGGER.debug("Ticket is expired because the time since creation is greater than maxTimeToLiveInMilliSeconds");
return true;
}
// Ticket is within hard window, check timeToKill (sliding window)
if ((System.currentTimeMillis() - ticketState.getLastTimeUsed() >= timeToKillInMilliSeconds)) {
LOGGER.debug("Ticket is expired because the time since last use is greater than timeToKillInMilliseconds");
return true;
}
return false;
}
示例5: isExpired
import org.jasig.cas.ticket.TicketState; //导入方法依赖的package包/类
@Override
public boolean isExpired(final TicketState ticketState) {
return (ticketState == null)
|| (System.currentTimeMillis() - ticketState.getCreationTime() >= this.timeToKillInMilliSeconds);
}
示例6: isExpired
import org.jasig.cas.ticket.TicketState; //导入方法依赖的package包/类
public boolean isExpired(final TicketState ticketState) {
return (ticketState == null)
|| (System.currentTimeMillis() - ticketState.getCreationTime() >= this.timeToKillInMilliSeconds);
}