public class SRegResponse extends SRegMessage
Modifier and Type | Field and Description |
---|---|
private static org.apache.commons.logging.Log |
_log |
private static boolean |
DEBUG |
protected static java.util.List |
SREG_FIELDS |
_parameters, OPENID_NS_SREG, OPENID_NS_SREG11
Modifier | Constructor and Description |
---|---|
protected |
SRegResponse()
Constructs a SReg Response with an empty parameter list.
|
protected |
SRegResponse(ParameterList params)
Constructs a SReg Response from a parameter list.
|
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(java.lang.String attr,
java.lang.String value)
Adds an attribute to the SReg response.
|
static SRegResponse |
createFetchResponse()
Constructs a SReg Response with an empty parameter list.
|
static SRegResponse |
createSRegResponse(ParameterList params) |
static SRegResponse |
createSRegResponse(SRegRequest req,
java.util.Map userData)
Creates a SRegResponse from a SRegRequest message and the data released
by the user.
|
java.util.List |
getAttributeNames()
Gets a list of attribute names in the SReg response.
|
java.util.Map |
getAttributes()
Gets a map with attribute names -> values.
|
java.lang.String |
getAttributeValue(java.lang.String attr)
Returns the value of an attribute.
|
private boolean |
isValid()
Checks the validity of the extension.
|
getExtension, getParameters, getParameterValue, getTypeUri, multivalDecode, multivalEncode, providesIdentifier, setParameters, setTypeUri, signRequired
private static org.apache.commons.logging.Log _log
private static final boolean DEBUG
protected static final java.util.List SREG_FIELDS
protected SRegResponse()
protected SRegResponse(ParameterList params)
The parameter list can be extracted from a received message with the
getExtensionParams method of the Message class, and MUST NOT contain
the "openid.
public static SRegResponse createFetchResponse()
public static SRegResponse createSRegResponse(ParameterList params) throws MessageException
MessageException
public static SRegResponse createSRegResponse(SRegRequest req, java.util.Map userData) throws MessageException
req
- SRegRequest message.userData
- MapMessageException
- if any attribute-name in the userData map does not
correspond to an SREG field-name.public void addAttribute(java.lang.String attr, java.lang.String value) throws MessageException
attr
- An attribute name.value
- The value of the attribute.MessageException
public java.lang.String getAttributeValue(java.lang.String attr)
attr
- The attribute name.public java.util.List getAttributeNames()
public java.util.Map getAttributes()
private boolean isValid()
Used when constructing a extension from a parameter list.
Copyright 2006-2008 Sxip Identity Corporation