@Test(expected = OpenIDConsumerException.class) public void discoveryExceptionRaisesOpenIDException() throws Exception { ConsumerManager mgr = mock(ConsumerManager.class); OpenID4JavaConsumer consumer = new OpenID4JavaConsumer(mgr, new NullAxFetchListFactory()); when(mgr.discover(any())).thenThrow(new DiscoveryException("msg")); consumer.beginConsumption(new MockHttpServletRequest(), "", "", ""); }
.thenThrow(new MessageException("")) .thenThrow(new AssociationException("")) .thenThrow(new DiscoveryException(""));
public DiscoveryInformation(URL opEndpoint, Identifier claimedIdentifier, String delegate, String version, Set types) throws DiscoveryException { if (opEndpoint == null) throw new DiscoveryException("Null OpenID Provider endpoint."); _opEndpoint = opEndpoint; _claimedIdentifier = claimedIdentifier; _delegate = delegate; _version = version; _types = types; }
public DiscoveryInformation(URL opEndpoint, Identifier claimedIdentifier, String delegate, String version, Set types) throws DiscoveryException { if (opEndpoint == null) throw new DiscoveryException("Null OpenID Provider endpoint."); _opEndpoint = opEndpoint; _claimedIdentifier = claimedIdentifier; _delegate = delegate; _version = version; _types = types; }
public DiscoveryInformation(URL opEndpoint, Identifier claimedIdentifier, String delegate, String version, Set types) throws DiscoveryException { if (opEndpoint == null) { throw new DiscoveryException("Null OpenID Provider endpoint."); } _opEndpoint = opEndpoint; _claimedIdentifier = claimedIdentifier; _delegate = delegate; _version = version; _types = types; }
public DiscoveryInformation(URL opEndpoint, Identifier claimedIdentifier, String delegate, String version, Set types) throws DiscoveryException { if (opEndpoint == null) throw new DiscoveryException("Null OpenID Provider endpoint."); _opEndpoint = opEndpoint; _claimedIdentifier = claimedIdentifier; _delegate = delegate; _version = version; _types = types; }
public DiscoveryInformation(URL opEndpoint, Identifier claimedIdentifier, String delegate, String version, Set types) throws DiscoveryException { if (opEndpoint == null) throw new DiscoveryException("Null OpenID Provider endpoint."); _opEndpoint = opEndpoint; _claimedIdentifier = claimedIdentifier; _delegate = delegate; _version = version; _types = types; }
public void setEndpoint1(String op1Endpoint) throws DiscoveryException { URL url; try { url = new URL(op1Endpoint); _op1Endpoint = url; } catch (MalformedURLException e) { throw new DiscoveryException( "Invalid openid.server URL: " + op1Endpoint); } }
public void setEndpoint2(String op2Endpoint) throws DiscoveryException { URL url; try { url = new URL(op2Endpoint); _op2Endpoint = url; } catch (MalformedURLException e) { throw new DiscoveryException( "Invalid openid2.provider URL: " + op2Endpoint); } }
public void setEndpoint2(String op2Endpoint) throws DiscoveryException { URL url; try { url = new URL(op2Endpoint); _op2Endpoint = url; } catch (MalformedURLException e) { throw new DiscoveryException( "Invalid openid2.provider URL: " + op2Endpoint); } }
public void setEndpoint1(String op1Endpoint) throws DiscoveryException { URL url; try { url = new URL(op1Endpoint); _op1Endpoint = url; } catch (MalformedURLException e) { throw new DiscoveryException( "Invalid openid.server URL: " + op1Endpoint); } }
public void setEndpoint2(String op2Endpoint) throws DiscoveryException { URL url; try { url = new URL(op2Endpoint); _op2Endpoint = url; } catch (MalformedURLException e) { throw new DiscoveryException( "Invalid openid2.provider URL: " + op2Endpoint); } }
public void setEndpoint2(String op2Endpoint) throws DiscoveryException { URL url; try { url = new URL(op2Endpoint); _op2Endpoint = url; } catch (MalformedURLException e) { throw new DiscoveryException( "Invalid openid2.provider URL: " + op2Endpoint); } }
public void setEndpoint2(String op2Endpoint) throws DiscoveryException { URL url; try { url = new URL(op2Endpoint); _op2Endpoint = url; } catch (MalformedURLException e) { throw new DiscoveryException( "Invalid openid2.provider URL: " + op2Endpoint); } }
public void setEndpoint1(String op1Endpoint) throws DiscoveryException { URL url; try { url = new URL(op1Endpoint); _op1Endpoint = url; } catch (MalformedURLException e) { throw new DiscoveryException( "Invalid openid.server URL: " + op1Endpoint); } }
public void setEndpoint1(String op1Endpoint) throws DiscoveryException { URL url; try { url = new URL(op1Endpoint); _op1Endpoint = url; } catch (MalformedURLException e) { throw new DiscoveryException( "Invalid openid.server URL: " + op1Endpoint); } }
public void setEndpoint1(String op1Endpoint) throws DiscoveryException { URL url; try { url = new URL(op1Endpoint); _op1Endpoint = url; } catch (MalformedURLException e) { throw new DiscoveryException( "Invalid openid.server URL: " + op1Endpoint); } }
public List discover(Identifier identifier) throws DiscoveryException { List result; if (identifier instanceof XriIdentifier) { _log.info("Starting discovery on XRI identifier: " + identifier); result = _xriResolver.discover((XriIdentifier) identifier); } else if (identifier instanceof UrlIdentifier) { _log.info("Starting discovery on URL identifier: " + identifier); UrlIdentifier urlId = (UrlIdentifier) identifier; result = _yadisResolver.discover(urlId.getIdentifier()); // fall-back to HTML discovery if (result == null || result.size() == 0) { _log.info("No OpenID service endpoints discovered through Yadis;" + " attempting HTML discovery..."); result = _htmlResolver.discoverHtml(urlId); } } else { throw new DiscoveryException( "Unknown identifier type: " + identifier.toString()); } _log.info("Discovered " + result.size() + " OpenID endpoints."); return result; }
throw new DiscoveryException("Invalid URL identifier", e); throw new DiscoveryException("Invalid URL identifier", e);
throw new DiscoveryException("Invalid URL identifier", e); throw new DiscoveryException("Invalid URL identifier", e);