OpenIdRelyingPartyApi openIdApi = openIdApiInstance.get();
List<OpenIdRequestedAttribute> attributes = new LinkedList<OpenIdRequestedAttribute>();
attributes.add(openIdApi.createOpenIdRequestedAttribute("email", "http://schema.openid.net/contact/email", true, 1));
OpenIdProvider selectedProvider = getSelectedProvider();
if (selectedProvider == null)
{
throw new IllegalStateException("No OpenID provider has been selected");
}
if (log.isDebugEnabled()) log.debug("Logging in using OpenID url: " + selectedProvider.getUrl());
openIdApi.login(selectedProvider.getUrl(), attributes,
(HttpServletResponse) FacesContext.getCurrentInstance().getExternalContext().getResponse());
setStatus(AuthenticationStatus.DEFERRED);
}