this.nonce = getNonce();
this.returnTo = appliesTo;
this.openID = openID;
this.opAdress = opAddress;
params.set(new Parameter(IdentityConstants.OpenId.ATTR_NS,
IdentityConstants.OpenId.OPENID_URL));
params.set(new Parameter(IdentityConstants.OpenId.ATTR_OP_ENDPOINT, opAddress));
params.set(new Parameter(IdentityConstants.OpenId.ATTR_CLAIM_ID, openID));
params.set(new Parameter(IdentityConstants.OpenId.ATTR_RESPONSE_NONCE, nonce));
params.set(new Parameter(IdentityConstants.OpenId.ATTR_MODE, "id_res"));
params.set(new Parameter(IdentityConstants.OpenId.ATTR_IDENTITY, openID));
params.set(new Parameter(IdentityConstants.OpenId.ATTR_RETURN_TO, appliesTo));
try {
this.assoc = getAssocHandle();
params
.set(new Parameter(IdentityConstants.OpenId.ATTR_ASSOC_HANDLE, assoc
.getHandle()));
if (log.isDebugEnabled()) {
log.debug("Association generated :::::" + assoc.getHandle());
}
} catch (AssociationException e) {
log.error("Failed to retreive assoc handle while building OpenID InfoCard header", e);
throw new IdentityProviderException(e.getMessage());
}
params.set(new Parameter(IdentityConstants.OpenId.ATTR_SIGNED,
"op_endpoint,claimed_id,identity,return_to,response_nonce,assoc_handle"));
try {
params.set(new Parameter(IdentityConstants.OpenId.ATTR_SIG, getSignature(false)));
} catch (AssociationException e) {
throw new IdentityProviderException(e.getMessage());
} catch (MessageException msgEx) {
throw new IdentityProviderException(msgEx.getMessage());
}