public class AssociationResponse extends Message
AssociationSessionType| Modifier and Type | Field and Description |
|---|---|
protected static List |
optionalFields |
protected static List |
requiredFields |
_destinationUrl, MODE_CANCEL, MODE_IDRES, MODE_SETUP_NEEDED, OPENID2_NS| Modifier | Constructor and Description |
|---|---|
protected |
AssociationResponse(AssociationRequest assocReq,
Association assoc)
Constructs an AssociationResponse for a given association request.
|
protected |
AssociationResponse(ParameterList params)
Constructs an AssociationResponse message from a parameter list.
|
| Modifier and Type | Method and Description |
|---|---|
static AssociationResponse |
createAssociationResponse(AssociationRequest assocReq,
Association assoc) |
static AssociationResponse |
createAssociationResponse(ParameterList params) |
Association |
getAssociation(DiffieHellmanSession dhSess)
Generates an Association object from an Association Response.
|
List |
getRequiredFields() |
AssociationSessionType |
getType()
Gets the association / session type of the association response.
|
boolean |
isVersion2()
Returns true for OpenID 2.0 messages, false otherwise.
|
void |
setAssocHandle(String handle)
Sets the handle of the association.
|
void |
setExpire(Long seconds)
Sets the lifetime, in seconds, of the association.
|
void |
setMacKey(String key)
Sets the unecrtypted MAC key of the association.
|
void |
setMacKeyEnc(String key)
Sets the encrypted MAC key of the association.
|
void |
setPublicKey(String key)
Sets the OP's (server's) public key for the association.
|
void |
setType(AssociationSessionType type)
Sets the association / session type for the association response.
|
void |
validate()
Checks if the message is a valid OpenID Association Response..
|
addExtension, addExtensionFactory, createMessage, createMessage, getDestinationUrl, getExtension, getExtensionAlias, getExtensionFactory, getExtensions, getParameter, getParameterMap, getParameters, getParameterValue, hasExtension, hasExtensionFactory, hasParameter, keyValueFormEncoding, set, wwwFormEncodingprotected static final List requiredFields
protected static final List optionalFields
protected AssociationResponse(AssociationRequest assocReq, Association assoc) throws AssociationException
assocReq - The association request that needs to be responded.assoc - The association which will be used to sign
authentication responses.AssociationExceptionprotected AssociationResponse(ParameterList params)
public static AssociationResponse createAssociationResponse(AssociationRequest assocReq, Association assoc) throws MessageException, AssociationException
MessageExceptionAssociationExceptionpublic static AssociationResponse createAssociationResponse(ParameterList params) throws MessageException
MessageExceptionpublic List getRequiredFields()
getRequiredFields in class Messagepublic boolean isVersion2()
public AssociationSessionType getType() throws AssociationException
AssociationExceptionpublic void setType(AssociationSessionType type)
public void setAssocHandle(String handle)
public void setExpire(Long seconds)
public void setMacKey(String key)
key - The unencrypted MAC key.public void setPublicKey(String key)
key - The server's public key for the association.public void setMacKeyEnc(String key)
key - The encrypted MAC key.public void validate()
throws MessageException
validate in class MessageMessageException - if message validation failed.public Association getAssociation(DiffieHellmanSession dhSess) throws AssociationException
dhSess - The Diffie-Helman session containing the private key
used to encrypt / decrypt the MAC key exchange.
Should be null for no-encryption sessions.AssociationExceptionCopyright © 2015 WSO2. All rights reserved.