consumerManager.setAssociations(new InMemoryConsumerAssociationStore()); consumerManager.setNonceVerifier(new InMemoryNonceVerifier(5000)); consumerManager.setMinAssocSessEnc(AssociationSessionType.DH_SHA256);
if (isTooOld(now, nonceDate))
protected synchronized int seen(Date now, String opUrl, String nonce) { removeAged(now); Set seenSet = (Set) _opMap.get(opUrl); if (seenSet == null) { seenSet = new HashSet(); _opMap.put(opUrl, seenSet); } if (seenSet.contains(nonce)) { _log.error("Possible replay attack! Already seen nonce: " + nonce); return SEEN; } seenSet.add(nonce); if (DEBUG) { _log.debug("Nonce verified: " + nonce); } return OK; }
@Inject public IOpenIDConsumerRemoteServiceImpl(ConsumerManager manager, ServerSessionProvider sessionProvider, IOpenIDUserDao<? extends OpenIDUserData> openIdUserDao) { this.manager = manager; this.manager.setAssociations(new InMemoryConsumerAssociationStore()); this.manager.setNonceVerifier(new InMemoryNonceVerifier(5000)); //this.manager.setMinAssocSessEnc(AssociationSessionType.DH_SHA256); this.manager.getRealmVerifier().setEnforceRpId(false); this.sessionProvider = sessionProvider; this.openIdUserDao = openIdUserDao; }
protected synchronized int seen(Date now, String opUrl, String nonce) { removeAged(now); Set seenSet = (Set) _opMap.get(opUrl); if (seenSet == null) { seenSet = new HashSet(); _opMap.put(opUrl, seenSet); } if (seenSet.contains(nonce)) { _log.error("Possible replay attack! Already seen nonce: " + nonce); return SEEN; } seenSet.add(nonce); if (DEBUG) _log.debug("Nonce verified: " + nonce); return OK; }
if (isTooOld(now, nonceDate))
public OpenIDManager(OpenIDRequest theReq) { this.request = theReq; consumerManager = new ConsumerManager(); consumerManager.setAssociations(new InMemoryConsumerAssociationStore()); consumerManager.setNonceVerifier(new InMemoryNonceVerifier(5000)); userString = request.getURL(); }
protected synchronized int seen(Date now, String opUrl, String nonce) { removeAged(now); Set seenSet = (Set) _opMap.get(opUrl); if (seenSet == null) { seenSet = new HashSet(); _opMap.put(opUrl, seenSet); } if (seenSet.contains(nonce)) { _log.error("Possible replay attack! Already seen nonce: " + nonce); return SEEN; } seenSet.add(nonce); if (DEBUG) _log.debug("Nonce verified: " + nonce); return OK; }
Date nonceDate = _dateFormat.parse(nonce); if (isTooOld(now, nonceDate)) { nonceToRemove.add(nonce);
public OpenIDManager(OpenIDRequest theReq) { this.request = theReq; consumerManager = new ConsumerManager(); consumerManager.setAssociations(new InMemoryConsumerAssociationStore()); consumerManager.setNonceVerifier(new InMemoryNonceVerifier(5000)); userString = request.getURL(); }
protected synchronized int seen(Date now, String opUrl, String nonce) { removeAged(now); Set seenSet = (Set) _opMap.get(opUrl); if (seenSet == null) { seenSet = new HashSet(); _opMap.put(opUrl, seenSet); } if (seenSet.contains(nonce)) { _log.error("Possible replay attack! Already seen nonce: " + nonce); return SEEN; } seenSet.add(nonce); if (DEBUG) _log.debug("Nonce verified: " + nonce); return OK; }
if (isTooOld(now, nonceDate))
public OpenIDManager(OpenIDRequest theReq) { this.request = theReq; consumerManager = new ConsumerManager(); consumerManager.setAssociations(new InMemoryConsumerAssociationStore()); consumerManager.setNonceVerifier(new InMemoryNonceVerifier(5000)); userString = request.getURL(); }
protected synchronized int seen(Date now, String opUrl, String nonce) { removeAged(now); Set seenSet = (Set) _opMap.get(opUrl); if (seenSet == null) { seenSet = new HashSet(); _opMap.put(opUrl, seenSet); } if (seenSet.contains(nonce)) { _log.error("Possible replay attack! Already seen nonce: " + nonce); return SEEN; } seenSet.add(nonce); if (DEBUG) _log.debug("Nonce verified: " + nonce); return OK; }
if (isTooOld(now, nonceDate))
public SampleConsumer(String returnToUrl) throws ConsumerException { // configure the return_to URL where your application will receive // the authentication responses from the OpenID provider this.returnToUrl = returnToUrl; // instantiate a ConsumerManager object manager = new ConsumerManager(); manager.setAssociations(new InMemoryConsumerAssociationStore()); manager.setNonceVerifier(new InMemoryNonceVerifier(5000)); // for a working demo, not enforcing RP realm discovery // since this new feature is not deployed manager.getRealmVerifier().setEnforceRpId(false); }
public SampleConsumer(String returnToUrl) throws ConsumerException { // configure the return_to URL where your application will receive // the authentication responses from the OpenID provider this.returnToUrl = returnToUrl; // instantiate a ConsumerManager object manager = new ConsumerManager(); manager.setAssociations(new InMemoryConsumerAssociationStore()); manager.setNonceVerifier(new InMemoryNonceVerifier(5000)); // for a working demo, not enforcing RP realm discovery // since this new feature is not deployed manager.getRealmVerifier().setEnforceRpId(false); }
public SampleConsumer(String returnToUrl) throws ConsumerException { // configure the return_to URL where your application will receive // the authentication responses from the OpenID provider this.returnToUrl = returnToUrl; // instantiate a ConsumerManager object manager = new ConsumerManager(); manager.setAssociations(new InMemoryConsumerAssociationStore()); manager.setNonceVerifier(new InMemoryNonceVerifier(5000)); // for a working demo, not enforcing RP realm discovery // since this new feature is not deployed manager.getRealmVerifier().setEnforceRpId(false); }
public SampleConsumer(String returnToUrl) throws ConsumerException { // configure the return_to URL where your application will receive // the authentication responses from the OpenID provider this.returnToUrl = returnToUrl; // instantiate a ConsumerManager object manager = new ConsumerManager(); manager.setAssociations(new InMemoryConsumerAssociationStore()); manager.setNonceVerifier(new InMemoryNonceVerifier(5000)); // for a working demo, not enforcing RP realm discovery // since this new feature is not deployed manager.getRealmVerifier().setEnforceRpId(false); }
public SampleConsumer(String returnToUrl) throws ConsumerException { // configure the return_to URL where your application will receive // the authentication responses from the OpenID provider this.returnToUrl = returnToUrl; // instantiate a ConsumerManager object manager = new ConsumerManager(); manager.setAssociations(new InMemoryConsumerAssociationStore()); manager.setNonceVerifier(new InMemoryNonceVerifier(5000)); // for a working demo, not enforcing RP realm discovery // since this new feature is not deployed manager.getRealmVerifier().setEnforceRpId(false); }