Tabnine Logo
AbstractSecurityToken.getTimeSource
Code IndexAdd Tabnine to your IDE (free)

How to use
getTimeSource
method
in
org.apache.shindig.auth.AbstractSecurityToken

Best Java code snippets using org.apache.shindig.auth.AbstractSecurityToken.getTimeSource (Showing top 6 results out of 315)

origin: apache/shindig

public AbstractSecurityToken enforceNotExpired() throws BlobExpiredException {
 Long expiresAt = getExpiresAt();
 if (expiresAt != null) {
  long maxTime = expiresAt + CLOCK_SKEW_ALLOWANCE;
  long now = getTimeSource().currentTimeMillis() / 1000;
  if (!(now < maxTime)) {
   throw new BlobExpiredException(now, maxTime);
  }
 }
 return this;
}
origin: apache/shindig

/**
 * Compute and set the expiration time for this token using the provided TTL.
 *
 * @param tokenTTL the time to live (in seconds) of the token
 * @return This security token.
 */
protected AbstractSecurityToken setExpires(int tokenTTL) {
 this.tokenTTL = tokenTTL;
 return setExpiresAt((getTimeSource().currentTimeMillis() / 1000) + getMaxTokenTTL());
}
origin: org.apache.shindig/shindig-common

/**
 * Compute and set the expiration time for this token using the provided TTL.
 *
 * @param tokenTTL the time to live (in seconds) of the token
 * @return This security token.
 */
protected AbstractSecurityToken setExpires(int tokenTTL) {
 this.tokenTTL = tokenTTL;
 return setExpiresAt((getTimeSource().currentTimeMillis() / 1000) + getMaxTokenTTL());
}
origin: org.apache.shindig/shindig-common

public AbstractSecurityToken enforceNotExpired() throws BlobExpiredException {
 Long expiresAt = getExpiresAt();
 if (expiresAt != null) {
  long maxTime = expiresAt + CLOCK_SKEW_ALLOWANCE;
  long now = getTimeSource().currentTimeMillis() / 1000;
  if (!(now < maxTime)) {
   throw new BlobExpiredException(now, maxTime);
  }
 }
 return this;
}
origin: org.wso2.org.apache.shindig/shindig-common

/**
 * Compute and set the expiration time for this token using the provided TTL.
 *
 * @param tokenTTL the time to live (in seconds) of the token
 * @return This security token.
 */
protected AbstractSecurityToken setExpires(int tokenTTL) {
 this.tokenTTL = tokenTTL;
 return setExpiresAt((getTimeSource().currentTimeMillis() / 1000) + getMaxTokenTTL());
}
origin: org.wso2.org.apache.shindig/shindig-common

public AbstractSecurityToken enforceNotExpired() throws BlobExpiredException {
 Long expiresAt = getExpiresAt();
 if (expiresAt != null) {
  long maxTime = expiresAt + CLOCK_SKEW_ALLOWANCE;
  long now = getTimeSource().currentTimeMillis() / 1000;
  if (!(now < maxTime)) {
   throw new BlobExpiredException(now, maxTime);
  }
 }
 return this;
}
org.apache.shindig.authAbstractSecurityTokengetTimeSource

Popular methods of AbstractSecurityToken

  • getExpiresAt
  • setActiveUrl
  • setAppId
  • setAppUrl
  • setContainer
  • setDomain
  • setExpiresAt
    Set the expiration time for this token.
  • setModuleId
  • setOwnerId
  • setTrustedJson
  • setViewerId
  • toMap
    A Map representation of this SecurityToken. Implementors that handle additional keys not contained i
  • setViewerId,
  • toMap,
  • enforceNotExpired,
  • getContainer,
  • getMapKeys,
  • getMaxTokenTTL,
  • setExpires,
  • loadFromMap,
  • setTimeSource

Popular in Java

  • Making http requests using okhttp
  • notifyDataSetChanged (ArrayAdapter)
  • getExternalFilesDir (Context)
  • onCreateOptionsMenu (Activity)
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now