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); } }
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 ) ; } }
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 ) ; } }
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 ) ; } }
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 ) ; } }
throw new AssociationException("unknown type: " + type); SecretKey macKey = association.getMacKey(); byte[] macKeyBytes = macKey.getEncoded(); encodedAssociation.write(macKeyBytes);
prepStmt.setString(2, association.getType()); prepStmt.setTimestamp(3, new java.sql.Timestamp(association.getExpiry().getTime())); prepStmt.setString(4, Base64.encode(association.getMacKey().getEncoded())); prepStmt.setString(5, associationStore); prepStmt.execute();
prepStmt.setString(2, association.getType()); prepStmt.setTimestamp(3, new java.sql.Timestamp(association.getExpiry().getTime())); prepStmt.setString(4, Base64.encode(association.getMacKey().getEncoded())); prepStmt.setString(5, associationStore); prepStmt.execute();
association.getType(), new String(Base64.encodeBase64( association.getMacKey().getEncoded())), association.getExpiry() });
association.getType(), new String(Base64.encodeBase64( association.getMacKey().getEncoded())), association.getExpiry() });
association.getType(), new String(Base64.encodeBase64( association.getMacKey().getEncoded())), association.getExpiry() });
association.getType(), new String(Base64.encodeBase64( association.getMacKey().getEncoded())), association.getExpiry() });
/** * 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()); } }
association.getType(), new String(Base64.encodeBase64( association.getMacKey().getEncoded())), association.getExpiry() });
/** * 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()); } }