@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); } }
private HTMLDocumentImpl parseDocument(String htmlData) throws DiscoveryException { OpenID4JavaDOMParser parser = new OpenID4JavaDOMParser(); try { parser.parse(OpenID4JavaDOMParser.createInputSource(htmlData)); } catch (Exception e) { throw new DiscoveryException("Error parsing HTML message", OpenIDException.DISCOVERY_HTML_PARSE_ERROR, e); } if (parser.isIgnoredHeadStartElement()) { throw new DiscoveryException( "HTML response must have exactly one HEAD element.", OpenIDException.DISCOVERY_HTML_PARSE_ERROR); } return (HTMLDocumentImpl) parser.getDocument(); }
private HTMLDocumentImpl parseDocument(String htmlData) throws DiscoveryException { OpenID4JavaDOMParser parser = new OpenID4JavaDOMParser(); try { parser.parse(OpenID4JavaDOMParser.createInputSource(htmlData)); } catch (Exception e) { throw new DiscoveryException("Error parsing HTML message", OpenIDException.DISCOVERY_HTML_PARSE_ERROR, e); } if (parser.isIgnoredHeadStartElement()) { throw new DiscoveryException( "HTML response must have exactly one HEAD element.", OpenIDException.DISCOVERY_HTML_PARSE_ERROR); } return (HTMLDocumentImpl) parser.getDocument(); }
private HTMLDocumentImpl parseDocument(String htmlData) throws DiscoveryException { OpenID4JavaDOMParser parser = new OpenID4JavaDOMParser(); try { parser.parse(OpenID4JavaDOMParser.createInputSource(htmlData)); } catch (Exception e) { throw new DiscoveryException("Error parsing HTML message", OpenIDException.DISCOVERY_HTML_PARSE_ERROR, e); } if (parser.isIgnoredHeadStartElement()) { throw new DiscoveryException( "HTML response must have exactly one HEAD element.", OpenIDException.DISCOVERY_HTML_PARSE_ERROR); } return (HTMLDocumentImpl) parser.getDocument(); }