|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openid4java.message.Message
org.openid4java.message.AssociationResponse
public class AssociationResponse
The OpenID Association Response message.
Handles OpenID 2.0 and OpenID 1.x messages.
AssociationSessionType| Field Summary | |
|---|---|
protected static java.util.List |
optionalFields
|
protected static java.util.List |
requiredFields
|
| Fields inherited from class org.openid4java.message.Message |
|---|
_destinationUrl, MODE_CANCEL, MODE_IDRES, MODE_SETUP_NEEDED, OPENID2_NS |
| Constructor Summary | |
|---|---|
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. |
| Method Summary | |
|---|---|
static AssociationResponse |
createAssociationResponse(AssociationRequest assocReq,
Association assoc)
|
static AssociationResponse |
createAssociationResponse(ParameterList params)
|
Association |
getAssociation(DiffieHellmanSession dhSess)
Generates an Association object from an Association Response. |
java.util.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(java.lang.String handle)
Sets the handle of the association. |
void |
setExpire(java.lang.Long seconds)
Sets the lifetime, in seconds, of the association. |
void |
setMacKey(java.lang.String key)
Sets the unecrtypted MAC key of the association. |
void |
setMacKeyEnc(java.lang.String key)
Sets the encrypted MAC key of the association. |
void |
setPublicKey(java.lang.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.. |
| Methods inherited from class org.openid4java.message.Message |
|---|
addExtension, addExtensionFactory, createMessage, createMessage, getDestinationUrl, getExtension, getExtensionAlias, getExtensionFactory, getExtensions, getParameter, getParameterMap, getParameters, getParameterValue, hasExtension, hasExtensionFactory, hasParameter, keyValueFormEncoding, set, wwwFormEncoding |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.util.List requiredFields
protected static final java.util.List optionalFields
| Constructor Detail |
|---|
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)
Useful for processing incoming messages.
| Method Detail |
|---|
public static AssociationResponse createAssociationResponse(AssociationRequest assocReq,
Association assoc)
throws MessageException,
AssociationException
MessageException
AssociationException
public static AssociationResponse createAssociationResponse(ParameterList params)
throws MessageException
MessageExceptionpublic java.util.List getRequiredFields()
getRequiredFields in class Messagepublic boolean isVersion2()
public void setType(AssociationSessionType type)
public AssociationSessionType getType()
throws AssociationException
AssociationExceptionpublic void setAssocHandle(java.lang.String handle)
public void setExpire(java.lang.Long seconds)
public void setMacKey(java.lang.String key)
Should be called only for association responses using no-encryption sessions.
key - The unencrypted MAC key.public void setPublicKey(java.lang.String key)
key - The server's public key for the association.public void setMacKeyEnc(java.lang.String key)
Should be called only for association responses using Diffie-Hellman sessions.
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.
AssociationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||