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);
endpointUrl = endpoint.getOPEndpoint().toString(); if (endpoint.getOPEndpoint().getAuthority().startsWith("*."))
endpointUrl = endpoint.getOPEndpoint().toString(); if (endpoint.getOPEndpoint().getAuthority().startsWith("*."))
endpointUrl = endpoint.getOPEndpoint().toString(); if (endpoint.getOPEndpoint().getAuthority().startsWith("*."))
/** * Verifies the nonce in an authentication response. * * @param authResp The authentication response containing the nonce * to be verified. * @param discovered The discovery information associated with the * authentication transaction. * @return True if the nonce is valid, false otherwise. */ public boolean verifyNonce(AuthSuccess authResp, DiscoveryInformation discovered) { String nonce = authResp.getNonce(); if (nonce == null) // compatibility mode nonce = extractConsumerNonce(authResp.getReturnTo(), discovered.getOPEndpoint().toString()); if (nonce == null) return false; // using the same nonce verifier for both server and consumer nonces return (NonceVerifier.OK == _nonceVerifier.seen( discovered.getOPEndpoint().toString(), nonce)); }
endpointUrl = endpoint.getOPEndpoint().toString(); if (endpoint.getOPEndpoint().getAuthority().startsWith("*."))
/** * Verifies the nonce in an authentication response. * * @param authResp The authentication response containing the nonce * to be verified. * @param discovered The discovery information associated with the * authentication transaction. * @return True if the nonce is valid, false otherwise. */ public boolean verifyNonce(AuthSuccess authResp, DiscoveryInformation discovered) { String nonce = authResp.getNonce(); if (nonce == null) // compatibility mode nonce = extractConsumerNonce(authResp.getReturnTo(), discovered.getOPEndpoint().toString()); if (nonce == null) return false; // using the same nonce verifier for both server and consumer nonces return (NonceVerifier.OK == _nonceVerifier.seen( discovered.getOPEndpoint().toString(), nonce)); }
/** * Verifies the nonce in an authentication response. * * @param authResp The authentication response containing the nonce * to be verified. * @param discovered The discovery information associated with the * authentication transaction. * @return True if the nonce is valid, false otherwise. */ public boolean verifyNonce(AuthSuccess authResp, DiscoveryInformation discovered) { String nonce = authResp.getNonce(); if (nonce == null) // compatibility mode nonce = extractConsumerNonce(authResp.getReturnTo(), discovered.getOPEndpoint().toString()); if (nonce == null) return false; // using the same nonce verifier for both server and consumer nonces return (NonceVerifier.OK == _nonceVerifier.seen( discovered.getOPEndpoint().toString(), nonce)); }
assoc = _associations.load(discovered.getOPEndpoint().toString()); d0.getOPEndpoint());
assoc = _associations.load(discovered.getOPEndpoint().toString()); d0.getOPEndpoint());
assoc = _associations.load(discovered.getOPEndpoint().toString()); d0.getOPEndpoint());
/** * Verifies the nonce in an authentication response. * * @param authResp The authentication response containing the nonce * to be verified. * @param discovered The discovery information associated with the * authentication transaction. * @return True if the nonce is valid, false otherwise. */ public boolean verifyNonce(AuthSuccess authResp, DiscoveryInformation discovered) { String nonce = authResp.getNonce(); if (nonce == null) // compatibility mode nonce = extractConsumerNonce(authResp.getReturnTo(), discovered.getOPEndpoint().toString()); if (nonce == null) return false; // using the same nonce verifier for both server and consumer nonces return (NonceVerifier.OK == _nonceVerifier.seen( discovered.getOPEndpoint().toString(), nonce)); }
/** * Verifies the nonce in an authentication response. * * @param authResp The authentication response containing the nonce * to be verified. * @param discovered The discovery information associated with the * authentication transaction. * @return True if the nonce is valid, false otherwise. */ public boolean verifyNonce(AuthSuccess authResp, DiscoveryInformation discovered) { String nonce = authResp.getNonce(); if (nonce == null) // compatibility mode { nonce = extractConsumerNonce(authResp.getReturnTo(), discovered.getOPEndpoint().toString()); } if (nonce == null) { return false; } // using the same nonce verifier for both server and consumer nonces return (NonceVerifier.OK == _nonceVerifier.seen( discovered.getOPEndpoint().toString(), nonce)); }
assoc = _associations.load(discovered.getOPEndpoint().toString()); d0.getOPEndpoint());
assoc = _associations.load(discovered.getOPEndpoint().toString()); d0.getOPEndpoint());
log.debug("Verify standard OpenID authentication request using: "+discovered.getOPEndpoint());
import java.util.List; import org.openid4java.consumer.ConsumerManager; import org.openid4java.discovery.DiscoveryException; import org.openid4java.discovery.DiscoveryInformation; public class XRDSConsumer { public static void main(String[] args) { ConsumerManager manager = new ConsumerManager(); try { //get XRDS from Google discovery url List<DiscoveryInformation> discoveries = manager.discover("https://www.google.com/accounts/o8/id"); for(DiscoveryInformation info: discoveries) { //will get something like: https://www.google.com/accounts/o8/ud System.out.println(info.getOPEndpoint()); } } catch (DiscoveryException e) { e.printStackTrace(); } } }
principal = createOpenIDPrincipal(identifier.getIdentifier(), discovered.getOPEndpoint(), attributes); request.getSession().setAttribute("PRINCIPAL", principal);
openIDPrincipal = createPrincipal(identifier.getIdentifier(), discovered.getOPEndpoint(), attributes); request.getSession().setAttribute("PRINCIPAL", openIDPrincipal);
openIDPrincipal = createPrincipal(identifier.getIdentifier(), discovered.getOPEndpoint(), attributes); request.getSession().setAttribute("PRINCIPAL", openIDPrincipal);