public class AssociationRequest extends Message
Handles OpenID 2.0 and OpenID 1.x messages.
AssociationSessionType
Modifier and Type | Field and Description |
---|---|
static String |
MODE_ASSOC |
protected static List |
optionalFields |
protected static 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) |
String |
getDhGen()
Gets the Diffie-Hellman generator parameter of the message, or null for
messages with no-encryption sessions.
|
String |
getDhModulus()
Gets the Diffie-Hellman modulus parameter of the message, or null for
messages with no-encryption sessions.
|
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.
|
List |
getRequiredFields() |
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, addExtension, addExtensionFactory, createMessage, createMessage, getDestinationUrl, getExtension, getExtensionAlias, getExtensionFactory, getExtensions, getParameter, getParameterMap, getParameters, getParameterValue, hasExtension, hasExtensionFactory, hasParameter, keyValueFormEncoding, set, wwwFormEncoding
public static final String MODE_ASSOC
protected static final List requiredFields
protected static final List optionalFields
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 List getRequiredFields()
getRequiredFields
in class Message
public boolean isVersion2()
public AssociationSessionType getType() throws AssociationException
AssociationException
public DiffieHellmanSession getDHSess()
public String getDhModulus()
public String getDhGen()
public String getDhPublicKey()
public void validate() throws MessageException
validate
in class Message
MessageException
- if message validation failed.Copyright © 2018 Sxip. All rights reserved.