Tabnine Logo
Association.getHandle
Code IndexAdd Tabnine to your IDE (free)

How to use
getHandle
method
in
org.openid4java.association.Association

Best Java code snippets using org.openid4java.association.Association.getHandle (Showing top 20 results out of 315)

origin: org.wso2.org.openid4java/openid4java-nodeps

public synchronized void save(String opUrl, Association association) {
  removeExpired();
  Map handleMap = (Map) _opMap.get(opUrl);
  if (handleMap == null) {
    handleMap = new HashMap();
    _opMap.put(opUrl, handleMap);
  }
  String handle = association.getHandle();
  if (DEBUG) {
    _log.debug("Adding association to the in-memory store: " + handle +
          " with OP: " + opUrl);
  }
  handleMap.put(association.getHandle(), association);
}
origin: org.openid4java/openid4java-nodeps

public synchronized void save(String opUrl, Association association)
{
  removeExpired();
  Map handleMap = (Map) _opMap.get(opUrl);
  if (handleMap == null)
  {
    handleMap = new HashMap();
    _opMap.put(opUrl, handleMap);
  }
  String handle = association.getHandle();
  if(DEBUG)
    _log.debug("Adding association to the in-memory store: " + handle +
          " with OP: " + opUrl);
  handleMap.put(association.getHandle(), association);
}
origin: org.openid4java/openid4java

public synchronized void save(String opUrl, Association association)
{
  removeExpired();
  Map handleMap = (Map) _opMap.get(opUrl);
  if (handleMap == null)
  {
    handleMap = new HashMap();
    _opMap.put(opUrl, handleMap);
  }
  String handle = association.getHandle();
  if(DEBUG)
    _log.debug("Adding association to the in-memory store: " + handle +
          " with OP: " + opUrl);
  handleMap.put(association.getHandle(), association);
}
origin: org.wso2.carbon.identity/org.wso2.carbon.identity.provider

  @Override
  public void run() {
    if(log.isDebugEnabled()) {
      log.debug("Storing association " + association.getHandle() + " in the database.");
    }
    dao.storeAssociation(association);
  }
};
origin: com.cloudbees/openid4java-shaded

public synchronized void save(String opUrl, Association association)
{
  removeExpired();
  Map handleMap = (Map) _opMap.get(opUrl);
  if (handleMap == null)
  {
    handleMap = new HashMap();
    _opMap.put(opUrl, handleMap);
  }
  String handle = association.getHandle();
  if(DEBUG)
    _log.debug("Adding association to the in-memory store: " + handle +
          " with OP: " + opUrl);
  handleMap.put(association.getHandle(), association);
}
origin: org.wso2.carbon.identity.inbound.auth.openid/org.wso2.carbon.identity.provider

  @Override
  public void run() {
    if(log.isDebugEnabled()) {
      log.debug("Storing association " + association.getHandle() + " in the database.");
    }
    dao.storeAssociation(association);
  }
};
origin: jbufu/openid4java

public synchronized void save(String opUrl, Association association)
{
  removeExpired();
  Map handleMap = (Map) _opMap.get(opUrl);
  if (handleMap == null)
  {
    handleMap = new HashMap();
    _opMap.put(opUrl, handleMap);
  }
  String handle = association.getHandle();
  if(DEBUG)
    _log.debug("Adding association to the in-memory store: " + handle +
          " with OP: " + opUrl);
  handleMap.put(association.getHandle(), association);
}
origin: org.wso2.carbon.identity/org.wso2.carbon.identity.provider

  public void removeExpiredAssociations() {
    Date currentTime = new Date();
    for (Map.Entry<String, Association> entry : associationMap.entrySet()) {
      Association association = entry.getValue();
      if(currentTime.after(association.getExpiry())) {
        if (log.isDebugEnabled()) {
          log.debug("Current time : " + currentTime.getTime() + ", expiry time : "
              + association.getExpiry().getTime() + ". Hence removing expired association : "
              + association.getHandle());
        }
        removeAssociation(association.getHandle());
      }
    }

  }
}
origin: org.wso2.carbon.identity.inbound.auth.openid/org.wso2.carbon.identity.provider

  public void removeExpiredAssociations() {
    Date currentTime = new Date();
    for (Map.Entry<String, Association> entry : associationMap.entrySet()) {
      Association association = entry.getValue();
      if(currentTime.after(association.getExpiry())) {
        if (log.isDebugEnabled()) {
          log.debug("Current time : " + currentTime.getTime() + ", expiry time : "
              + association.getExpiry().getTime() + ". Hence removing expired association : "
              + association.getHandle());
        }
        removeAssociation(association.getHandle());
      }
    }

  }
}
origin: org.wso2.carbon.identity.inbound.auth.openid/org.wso2.carbon.identity.provider

public void addAssociation(Association association) {
  associationMap.put(association.getHandle(),association);
  AssociationClusterMessage associationInfoData = new AssociationClusterMessage(association, false);
  replicateAssociationInfo(associationInfoData);
}
origin: org.wso2.carbon.identity/org.wso2.carbon.identity.provider

public void addAssociation(Association association) {
  associationMap.put(association.getHandle(),association);
  AssociationClusterMessage associationInfoData = new AssociationClusterMessage(association, false);
  replicateAssociationInfo(associationInfoData);
}
origin: org.wso2.carbon.identity.inbound.auth.openid/org.wso2.carbon.identity.provider

public Association generate(String type, int expiryIn) throws AssociationException {
  String handle = storeId + timestamp + "-" + getCounter();
  Association association = Association.generate(type, handle, expiryIn);
  // replicating association using cluster messages
  if(log.isDebugEnabled()) {
    log.debug("Storing association " + association.getHandle() + " in the map.");
  }
  OpenIDAssociationReplicationManager.getPersistenceManager().addAssociation(association);
  return association;
}
origin: org.wso2.carbon.identity/org.wso2.carbon.identity.provider

public Association generate(String type, int expiryIn) throws AssociationException {
  String handle = storeId + timestamp + "-" + getCounter();
  Association association = Association.generate(type, handle, expiryIn);
  // replicating association using cluster messages
  if(log.isDebugEnabled()) {
    log.debug("Storing association " + association.getHandle() + " in the map.");
  }
  OpenIDAssociationReplicationManager.getPersistenceManager().addAssociation(association);
  return association;
}
origin: org.wso2.carbon.identity/org.wso2.carbon.identity.provider

private void replicateAssociationInfo(AssociationClusterMessage associationInfoData) {
  if (log.isDebugEnabled()) {
    log.debug("Starting to replicate association : " + associationInfoData.getAssociation().getHandle());
  }
  ClusteringAgent agent = IdentityProviderServiceComponent.getConfigContext().getAxisConfiguration().getClusteringAgent();
  if (log.isDebugEnabled()) {
    log.debug("Clustering Agent: " + agent);
  }
  if (agent != null) {
    try {
      agent.sendMessage(associationInfoData, true);
    } catch (ClusteringFault e) {
      log.error("Unable to send cluster message :" + e.getMessage(), e);
    }
  }
  if (log.isDebugEnabled()) {
    log.debug("Completed replicating association : " + associationInfoData.getAssociation().getHandle());
  }
}
origin: org.wso2.carbon.identity.inbound.auth.openid/org.wso2.carbon.identity.provider

private void replicateAssociationInfo(AssociationClusterMessage associationInfoData) {
  if (log.isDebugEnabled()) {
    log.debug("Starting to replicate association : " + associationInfoData.getAssociation().getHandle());
  }
  ClusteringAgent agent = IdentityProviderServiceComponent.getConfigContext().getAxisConfiguration().getClusteringAgent();
  if (log.isDebugEnabled()) {
    log.debug("Clustering Agent: " + agent);
  }
  if (agent != null) {
    try {
      agent.sendMessage(associationInfoData, true);
    } catch (ClusteringFault e) {
      log.error("Unable to send cluster message :" + e.getMessage(), e);
    }
  }
  if (log.isDebugEnabled()) {
    log.debug("Completed replicating association : " + associationInfoData.getAssociation().getHandle());
  }
}
origin: org.wso2.carbon.identity/org.wso2.carbon.identity.provider

/**
 * Add the entry to the cache.
 *
 * @param association
 */
public void addToCache(Association association) {
  if(association == null){
    throw new IllegalArgumentException("Association is \'Null\'");
  }
  OpenIDIdentityCacheKey cacheKey = new OpenIDIdentityCacheKey(0, association.getHandle());
  OpenIDIdentityCacheEntry cacheEntry =
      new OpenIDIdentityCacheEntry(association.getType(), association.getMacKey(),
                     association.getExpiry());
  associationCache.addToCache(cacheKey, cacheEntry);
  if (log.isDebugEnabled()) {
    log.debug("New entry is added to cache for handle : " + association.getHandle());
  }
}
origin: org.picketlink/picketlink-openid

/**
 * @see org.openid4java.server.ServerAssociationStore#generate(java.lang.String, int)
 */
public Association generate(String type, int expiryIn) throws AssociationException {
  Association association = store.generate(type, expiryIn);
  try {
    addToken(association.getHandle(), association);
  } catch (IOException e) {
    throw new AssociationException(e);
  }
  return association;
}
origin: org.picketlink/picketlink-consolidated-social

/**
 * @see org.openid4java.server.ServerAssociationStore#generate(java.lang.String, int)
 */
public Association generate(String type, int expiryIn) throws AssociationException {
  Association association = store.generate(type, expiryIn);
  try {
    addToken(association.getHandle(), association);
  } catch (IOException e) {
    throw new AssociationException(e);
  }
  return association;
}
origin: picketlink/picketlink

/**
 * @see org.openid4java.server.ServerAssociationStore#generate(java.lang.String, int)
 */
public Association generate(String type, int expiryIn) throws AssociationException {
  Association association = store.generate(type, expiryIn);
  try {
    addToken(association.getHandle(), association);
  } catch (IOException e) {
    throw new AssociationException(e);
  }
  return association;
}
origin: org.wso2.org.openid4java/openid4java-nodeps

public void save(String opUrl, Association association) {
  cleanupExpired();
  try {
    JdbcTemplate jdbcTemplate = getJdbcTemplate();
    int cnt = jdbcTemplate.update(_sqlInsert,
                   new Object[]
                       {
                           opUrl,
                           association.getHandle(),
                           association.getType(),
                           association.getMacKey() == null ? null :
                           new String(
                               Base64.encodeBase64(association.getMacKey().getEncoded())),
                           association.getExpiry()});
  } catch (Exception e) {
    _log.error("Error saving association to table: " + _tableName, e);
  }
}
org.openid4java.associationAssociationgetHandle

Popular methods of Association

  • hasExpired
  • createHmacSha1
  • createHmacSha256
  • generate
  • getExpiry
  • getMacKey
  • getType
  • sign
  • verifySignature
  • <init>
  • createMacKey
  • generateHmacSha1
  • createMacKey,
  • generateHmacSha1,
  • generateHmacSha256,
  • generateMacKey,
  • generateMacSha1Key,
  • generateMacSha256Key,
  • getFailedAssociation,
  • isHmacSha256Supported,
  • isHmacSupported

Popular in Java

  • Making http requests using okhttp
  • getContentResolver (Context)
  • scheduleAtFixedRate (Timer)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • JCheckBox (javax.swing)
  • Top PhpStorm 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