当前位置: 首页>>代码示例>>Java>>正文


Java TicketState.getCreationTime方法代码示例

本文整理汇总了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;
}
 
开发者ID:yuweijun,项目名称:cas-server-4.2.1,代码行数:19,代码来源:TicketGrantingTicketExpirationPolicy.java

示例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;
}
 
开发者ID:luotuo,项目名称:cas4.0.x-server-wechat,代码行数:16,代码来源:TicketGrantingTicketExpirationPolicy.java

示例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);
}
 
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:6,代码来源:HardTimeoutExpirationPolicy.java

示例6: isExpired

import org.jasig.cas.ticket.TicketState; //导入方法依赖的package包/类
public boolean isExpired(final TicketState ticketState) {
    return (ticketState == null)
            || (System.currentTimeMillis() - ticketState.getCreationTime() >= this.timeToKillInMilliSeconds);
}
 
开发者ID:luotuo,项目名称:cas4.0.x-server-wechat,代码行数:5,代码来源:HardTimeoutExpirationPolicy.java


注:本文中的org.jasig.cas.ticket.TicketState.getCreationTime方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。