class AccessTokenResponseCacheEntry {

    public boolean isExpired(long expirySeconds) {

        // before returning our cache hit we need to make sure it
        // it was at least 1/4th time left before the token expires
        // if the expiryTime is -1 then we return the token as
        // long as its not expired

        long now = System.currentTimeMillis() / 1000;
        if (expirySeconds == -1) {
            return expiryTime <= now;
        }

        // if we have no expiry seconds specified, then we're going
        // to use the original server expiry seconds specified in
        // the token response object

        if (expirySeconds == 0) {
            expirySeconds = serverExpirySecs;
        }
        return (expiryTime < System.currentTimeMillis() / 1000 + expirySeconds / 4);
    }

      AccessTokenResponseCacheEntry(AccessTokenResponse accessTokenResponse);

}