Identifier verified = verification.getVerifiedId();
String openid = null;
if( verified != null ){
AuthSuccess authSuccess = (AuthSuccess)verification.getAuthResponse();
/*
* This piece of code does not work with blogspot.com while it works well
* with myopenid.com.
request.setAttribute("opendpoint", authSuccess.getOpEndpoint());
request.setAttribute("claimed", authSuccess.getClaimed());
session.setAttribute("openid", authSuccess.getClaimed());
*/
openid = (String)session.getAttribute(OPENID_CLAIMED_ID_SESSION);
session.removeAttribute(OPENID_CLAIMED_ID_SESSION);
if (authSuccess.hasExtension(SRegMessage.OPENID_NS_SREG)) {
logger.info("resp contains SREG extension");
MessageExtension ext = authSuccess.getExtension(SRegMessage.OPENID_NS_SREG);
if (ext instanceof SRegResponse) {
logger.info("got a sreg response");
SRegResponse sregResp = (SRegResponse) ext;
Map sregmap = sregResp.getAttributes();
request.setAttribute(sregmapAttrName, sregmap);
}
}
if (authSuccess.hasExtension(AxMessage.OPENID_NS_AX)) {
FetchResponse fetchResp = (FetchResponse) authSuccess.getExtension(AxMessage.OPENID_NS_AX);
logger.info("resp contains AX extension");
request.setAttribute(axmapAttrName, fetchResp.getAttributes());
List aliases = fetchResp.getAttributeAliases();
for (Iterator iter = aliases.iterator(); iter.hasNext();) {