org.openid4java.message
public class AssociationRequest extends Message
Handles OpenID 2.0 and OpenID 1.x messages.
AssociationSessionType
Modifier and Type | Field and Description |
---|---|
private DiffieHellmanSession |
_dhSess
The Diffie-Hellman session containing the cryptografic data needed for
encrypting the MAC key exchange.
|
private static org.apache.commons.logging.Log |
_log |
private static boolean |
DEBUG |
static java.lang.String |
MODE_ASSOC |
protected static java.util.List |
optionalFields |
protected static java.util.List |
requiredFields |
_destinationUrl, MODE_CANCEL, MODE_IDRES, MODE_SETUP_NEEDED, OPENID2_NS
Modifier | Constructor and Description |
---|---|
protected |
AssociationRequest(AssociationSessionType type)
Creates an Association Request message with the
specified association type and "no-encryption" session.
|
protected |
AssociationRequest(AssociationSessionType type,
DiffieHellmanSession dhSess)
Constructs an AssociationRequest message with the
specified association type and Diffie-Hellman session.
|
protected |
AssociationRequest(ParameterList params)
Constructs an AssociationRequest message from a parameter list.
|
Modifier and Type | Method and Description |
---|---|
static AssociationRequest |
createAssociationRequest(AssociationSessionType type) |
static AssociationRequest |
createAssociationRequest(AssociationSessionType type,
DiffieHellmanSession dhSess) |
static AssociationRequest |
createAssociationRequest(ParameterList params) |
private java.lang.String |
getAssociationType()
Gets the association type parameter of the message.
|
java.lang.String |
getDhGen()
Gets the Diffie-Hellman generator parameter of the message, or null for
messages with no-encryption sessions.
|
java.lang.String |
getDhModulus()
Gets the Diffie-Hellman modulus parameter of the message, or null for
messages with no-encryption sessions.
|
java.lang.String |
getDhPublicKey()
Gets the Relying Party's (consumer) Diffie-Hellman public key, or null
for messages with no-encryption sessions.
|
DiffieHellmanSession |
getDHSess()
Gets the Diffie-Hellman session
Null for no-encryption association requests.
|
java.util.List |
getRequiredFields() |
private java.lang.String |
getSessionType()
Gets the session type parameter of the message.
|
AssociationSessionType |
getType()
Gets the association / session type of the association request.
|
boolean |
isVersion2()
Returns true for OpenID 2.0 messages, false otherwise.
|
void |
validate()
Checks if the message is a valid OpenID Association Request.
|
addExtension, addExtensionFactory, createMessage, createMessage, getDestinationUrl, getExtension, getExtensionAlias, getExtensionFactory, getExtensions, getParameter, getParameterMap, getParameters, getParameterValue, hasExtension, hasExtensionFactory, hasParameter, keyValueFormEncoding, set, wwwFormEncoding
private static org.apache.commons.logging.Log _log
private static final boolean DEBUG
public static final java.lang.String MODE_ASSOC
protected static final java.util.List requiredFields
protected static final java.util.List optionalFields
private DiffieHellmanSession _dhSess
Null for no-encryption sessions.
protected AssociationRequest(AssociationSessionType type)
The supplied type must be one of the "no-encryption" types, otherwise a DiffieHellman session is required.
protected AssociationRequest(AssociationSessionType type, DiffieHellmanSession dhSess)
dhSess
- Diffie-Hellman session to be used for this association;
if null, a "no-encryption" session is created.protected AssociationRequest(ParameterList params)
Useful for processing incoming messages.
public static AssociationRequest createAssociationRequest(AssociationSessionType type) throws MessageException
MessageException
public static AssociationRequest createAssociationRequest(AssociationSessionType type, DiffieHellmanSession dhSess) throws MessageException
MessageException
public static AssociationRequest createAssociationRequest(ParameterList params) throws MessageException
MessageException
public java.util.List getRequiredFields()
getRequiredFields
in class Message
public boolean isVersion2()
private java.lang.String getAssociationType()
private java.lang.String getSessionType()
public AssociationSessionType getType() throws AssociationException
AssociationException
public DiffieHellmanSession getDHSess()
public java.lang.String getDhModulus()
public java.lang.String getDhGen()
public java.lang.String getDhPublicKey()
public void validate() throws MessageException
validate
in class Message
MessageException
- if message validation failed.Copyright 2006-2008 Sxip Identity Corporation