public String toString() { return (isVersion2() ? "OpenID2" : "OpenID1") + "\nOP-endpoint:" + _opEndpoint + "\nClaimedID:" + _claimedIdentifier + "\nDelegate:" + _delegate; } }
Identifier id = discovered.getClaimedIdentifier(); return new OpenIDAuthenticationToken(OpenIDAuthenticationStatus.FAILURE, id == null ? "Unknown" : id.getIdentifier(),
if ( discovered != null && ! discovered.isVersion2() && discovered.getClaimedIdentifier() != null ) _log.debug("Verifying discovered information " + "for OpenID1 assertion about ClaimedID: " + discovered.getClaimedIdentifier().getIdentifier()); String discoveredId = discovered.hasDelegateIdentifier() ? discovered.getDelegateIdentifier() : discovered.getClaimedIdentifier().getIdentifier(); if (service.isVersion2() || // only interested in v1 ! service.hasClaimedIdentifier() || // need a claimedId service.hasDelegateIdentifier() || // not allowing delegates ! assertId.equals(service.getClaimedIdentifier().getIdentifier())) continue; service.getOPEndpoint().toString(), authResp.getHandle());
while (iter.hasNext()) { endpoint = (DiscoveryInformation) iter.next(); endpointUrl = endpoint.getOPEndpoint().toString(); if (endpoint.getOPEndpoint().getAuthority().startsWith("*.")) { _log.warn("Wildcard not allowed in discovered " + "RP endpoints; found: " + endpointUrl);
Identifier claimedId = discovered.isVersion2() ? discovered.getClaimedIdentifier(); //assert id may be delegate in v1 URL op = discovered.getOPEndpoint(); Association assoc = _associations.load(op.toString(), handle);
URL opUrl = discovered.getOPEndpoint(); String opEndpoint = opUrl.toString(); if (discovered.isVersion2()) if (_prefAssocSessEnc.isVersion2() == discovered.isVersion2()) requests.put(_prefAssocSessEnc, null); if ( respType.equals(assocReq.getType()) || ( ! discovered.isVersion2() && respType.getHAlgorithm() == null && createAssociationRequest(respType,opUrl) != null)) _log.info("Associated with " + discovered.getOPEndpoint() + " handle: " + assoc.getHandle()); break;
if (discovered.getClaimedIdentifier() != null) { memento.setClaimedIdentifier(discovered.getClaimedIdentifier().getIdentifier()); memento.setDelegate(discovered.getDelegateIdentifier()); if (discovered.getOPEndpoint() != null) { memento.setOpEndpoint(discovered.getOPEndpoint().toString()); memento.setTypes(discovered.getTypes()); memento.setVersion(discovered.getVersion());
public List getDiscoveredInformation(Set targetTypes) throws DiscoveryException { List result = new ArrayList(); if (hasEndpoints()) { XrdsServiceEndpoint endpoint; Iterator endpointsIter = _endpoints.iterator(); while (endpointsIter.hasNext()) { endpoint = (XrdsServiceEndpoint) endpointsIter.next(); Iterator typesIter = endpoint.getTypes().iterator(); while (typesIter.hasNext()) { String type = (String) typesIter.next(); if (!targetTypes.contains(type)) continue; try { result.add(new DiscoveryInformation( new URL(endpoint.getUri()), DiscoveryInformation.OPENID_SIGNON_TYPES.contains(type) ? new UrlIdentifier(_normalizedUrl) : null, DiscoveryInformation.OPENID2.equals(type) ? endpoint.getLocalId() : DiscoveryInformation.OPENID1_SIGNON_TYPES.contains(type) ? endpoint.getDelegate() : null, type, endpoint.getTypes())); } catch (MalformedURLException e) { throw new YadisException("Invalid endpoint URL discovered: " + endpoint.getUri(), OpenIDException.YADIS_INVALID_URL); } } } } return result; }
if (discovered == null || ! discovered.hasClaimedIdentifier())
if ( discovered != null && ! discovered.isVersion2() && discovered.getClaimedIdentifier() != null ) _log.debug("Verifying discovered information " + "for OpenID1 assertion about ClaimedID: " + discovered.getClaimedIdentifier().getIdentifier()); String discoveredId = discovered.hasDelegateIdentifier() ? discovered.getDelegateIdentifier() : discovered.getClaimedIdentifier().getIdentifier(); if (service.isVersion2() || // only interested in v1 ! service.hasClaimedIdentifier() || // need a claimedId service.hasDelegateIdentifier() || // not allowing delegates ! assertId.equals(service.getClaimedIdentifier().getIdentifier())) continue; service.getOPEndpoint().toString(), authResp.getHandle());
endpointUrl = endpoint.getOPEndpoint().toString(); if (endpoint.getOPEndpoint().getAuthority().startsWith("*."))
Identifier claimedId = discovered.isVersion2() ? discovered.getClaimedIdentifier(); //assert id may be delegate in v1 URL op = discovered.getOPEndpoint(); Association assoc = _associations.load(op.toString(), handle);
URL opUrl = discovered.getOPEndpoint(); String opEndpoint = opUrl.toString(); if (discovered.isVersion2()) { requests.put(AssociationSessionType.NO_ENCRYPTION_SHA1MAC, null); requests.put(AssociationSessionType.NO_ENCRYPTION_SHA256MAC, null); if (_prefAssocSessEnc.isVersion2() == discovered.isVersion2()) { requests.put(_prefAssocSessEnc, null); if (respType.equals(assocReq.getType()) || (!discovered.isVersion2() && respType.getHAlgorithm() == null && createAssociationRequest(respType, opUrl) != null)) { _log.info("Associated with " + discovered.getOPEndpoint() + " handle: " + assoc.getHandle()); break;
public List getDiscoveredInformation(Set targetTypes) throws DiscoveryException { List result = new ArrayList(); if (hasEndpoints()) { XrdsServiceEndpoint endpoint; Iterator endpointsIter = _endpoints.iterator(); while (endpointsIter.hasNext()) { endpoint = (XrdsServiceEndpoint) endpointsIter.next(); Iterator typesIter = endpoint.getTypes().iterator(); while (typesIter.hasNext()) { String type = (String) typesIter.next(); if (!targetTypes.contains(type)) continue; try { result.add(new DiscoveryInformation( new URL(endpoint.getUri()), DiscoveryInformation.OPENID_SIGNON_TYPES.contains(type) ? new UrlIdentifier(_normalizedUrl) : null, DiscoveryInformation.OPENID2.equals(type) ? endpoint.getLocalId() : DiscoveryInformation.OPENID1_SIGNON_TYPES.contains(type) ? endpoint.getDelegate() : null, type, endpoint.getTypes())); } catch (MalformedURLException e) { throw new YadisException("Invalid endpoint URL discovered: " + endpoint.getUri(), OpenIDException.YADIS_INVALID_URL); } } } } return result; }
if (discovered == null || ! discovered.hasClaimedIdentifier())
_associations.load(discovered.getOPEndpoint().toString()); assoc = _associations.load(discovered.getOPEndpoint().toString()); if (discovered.hasClaimedIdentifier()) claimedId = discovered.getClaimedIdentifier().getIdentifier(); delegate = discovered.hasDelegateIdentifier() ? discovered.getDelegateIdentifier() : claimedId; " OP-endpoint: " + discovered.getOPEndpoint() + " claimedID: " + claimedId + " OP-specific ID: " + delegate); if (! discovered.isVersion2()) returnToUrl = insertConsumerNonce(discovered.getOPEndpoint().toString(), returnToUrl); ! discovered.isVersion2(), returnToUrl, handle, realm, _realmVerifier); authReq.setOPEndpoint(discovered.getOPEndpoint());
endpointUrl = endpoint.getOPEndpoint().toString(); if (endpoint.getOPEndpoint().getAuthority().startsWith("*."))
Identifier claimedId = discovered.isVersion2() ? discovered.getClaimedIdentifier(); //assert id may be delegate in v1 URL op = discovered.getOPEndpoint(); Association assoc = _associations.load(op.toString(), handle);
URL opUrl = discovered.getOPEndpoint(); String opEndpoint = opUrl.toString(); if (discovered.isVersion2()) if (_prefAssocSessEnc.isVersion2() == discovered.isVersion2()) { requests.remove(_prefAssocSessEnc); requests.put(_prefAssocSessEnc, null); if ( respType.equals(assocReq.getType()) || ( ! discovered.isVersion2() && respType.getHAlgorithm() == null && createAssociationRequest(respType,opUrl) != null)) _log.info("Associated with " + discovered.getOPEndpoint() + " handle: " + assoc.getHandle()); break;
public String toString() { return (isVersion2() ? "OpenID2" : "OpenID1") + "\nOP-endpoint:" + _opEndpoint + "\nClaimedID:" + _claimedIdentifier + "\nDelegate:" + _delegate; } }