public static AssociationResponse createAssociationResponse(ParameterList params) throws MessageException { AssociationResponse resp = new AssociationResponse(params); resp.validate(); if (DEBUG) _log.debug("Created association response from message parameters:\n" + resp.keyValueFormEncoding() ); return resp; }
/** * Gets the association / session type of the association response. * * @throws AssociationException */ public AssociationSessionType getType() throws AssociationException { return AssociationSessionType.create( getSessionType(), getAssociationType(), !isVersion2()); }
/** * Returns true for OpenID 2.0 messages, false otherwise. */ public boolean isVersion2() { return hasParameter("ns") && OPENID2_NS.equals(getParameterValue("ns")); }
type = getType(); if (type.isVersion2() ^ isVersion2()) if (! isVersion2() && getAssociationType() == null) if (type.getHAlgorithm() != null) // DH session if ( ! hasParameter("dh_server_public") || ! hasParameter("enc_mac_key") ) macKey = getParameterValue("enc_mac_key"); } else // no-enc session if ( !hasParameter("mac_key") ) macKey = getParameterValue("mac_key");
.createAssociationResponse(respParams); assocResp.getAssociation(assocReq.getDHSess()); handle = assoc.getHandle(); AssociationSessionType respType = assocResp.getType(); if ( respType.equals(assocReq.getType()) ||
String handle = getParameterValue("assoc_handle"); int expiresIn = Integer.parseInt( getParameterValue("expires_in") ); AssociationSessionType type = getType(); getParameterValue("enc_mac_key"), getParameterValue("dh_server_public") ); if (DEBUG) _log.debug("Decrypted MAC key (base64): " + new String(Base64.encodeBase64(macKey))); getParameterValue("mac_key").getBytes() ); + getParameterValue("mac_key"));
/** * Gets the association type parameter of the message. */ private String getAssociationType() { return getParameterValue("assoc_type"); }
return AssociationResponse.createAssociationResponse(assocReq, assoc); return AssociationResponse.createAssociationResponse( dummyRequest, dummyAssoc); } catch (OpenIDException ee) {
type = getType(); if (type.isVersion2() ^ isVersion2()) if (! isVersion2() && getAssociationType() == null) if (type.getHAlgorithm() != null) // DH session if ( ! hasParameter("dh_server_public") || ! hasParameter("enc_mac_key") ) macKey = getParameterValue("enc_mac_key"); } else // no-enc session if ( !hasParameter("mac_key") ) macKey = getParameterValue("mac_key");
.createAssociationResponse(respParams); assocResp.getAssociation(assocReq.getDHSess()); handle = assoc.getHandle(); AssociationSessionType respType = assocResp.getType(); if ( respType.equals(assocReq.getType()) ||
String handle = getParameterValue("assoc_handle"); int expiresIn = Integer.parseInt( getParameterValue("expires_in") ); AssociationSessionType type = getType(); getParameterValue("enc_mac_key"), getParameterValue("dh_server_public") ); if (DEBUG) _log.debug("Decrypted MAC key (base64): " + new String(Base64.encodeBase64(macKey))); getParameterValue("mac_key").getBytes() ); + getParameterValue("mac_key"));
/** * Gets the session type parameter of the message. */ private String getSessionType() { return getParameterValue("session_type"); }
return AssociationResponse.createAssociationResponse(assocReq, assoc); return AssociationResponse.createAssociationResponse( dummyRequest, dummyAssoc);
type = getType(); if (type.isVersion2() ^ isVersion2()) if (! isVersion2() && getAssociationType() == null) if (type.getHAlgorithm() != null) // DH session if ( ! hasParameter("dh_server_public") || ! hasParameter("enc_mac_key") ) macKey = getParameterValue("enc_mac_key"); } else // no-enc session if ( !hasParameter("mac_key") ) macKey = getParameterValue("mac_key");
public static AssociationResponse createAssociationResponse( AssociationRequest assocReq, Association assoc) throws MessageException, AssociationException { AssociationResponse resp = new AssociationResponse(assocReq, assoc); resp.validate(); if (DEBUG) { _log.debug("Created association response:\n" + resp.keyValueFormEncoding()); } return resp; }
/** * Gets the association / session type of the association response. * * @throws AssociationException */ public AssociationSessionType getType() throws AssociationException { return AssociationSessionType.create( getSessionType(), getAssociationType(), ! isVersion2() ); }
.createAssociationResponse(respParams); assocResp.getAssociation(assocReq.getDHSess()); handle = assoc.getHandle(); AssociationSessionType respType = assocResp.getType(); if ( respType.equals(assocReq.getType()) ||
/** * Returns true for OpenID 2.0 messages, false otherwise. */ public boolean isVersion2() { return hasParameter("ns") && OPENID2_NS.equals(getParameterValue("ns")); }
String handle = getParameterValue("assoc_handle"); int expiresIn = Integer.parseInt( getParameterValue("expires_in") ); AssociationSessionType type = getType(); getParameterValue("enc_mac_key"), getParameterValue("dh_server_public") ); if (DEBUG) _log.debug("Decrypted MAC key (base64): " + new String(Base64.encodeBase64(macKey))); getParameterValue("mac_key").getBytes() ); + getParameterValue("mac_key"));
/** * Gets the session type parameter of the message. */ private String getSessionType() { return getParameterValue("session_type"); }