org.openid4java.message.sreg
public class SRegMessage extends java.lang.Object implements MessageExtension, MessageExtensionFactory
Encapsulates:
MessageExtension
Modifier and Type | Field and Description |
---|---|
private static org.apache.commons.logging.Log |
_log |
protected ParameterList |
_parameters
The Simple Registration extension-specific parameters.
|
private java.lang.String |
_typeUri |
private static boolean |
DEBUG |
static java.lang.String |
OPENID_NS_SREG
The Simple Registration 1.0 namespace URI.
|
static java.lang.String |
OPENID_NS_SREG11
The Simple Registration 1.1 namespace URI.
|
Constructor and Description |
---|
SRegMessage()
Constructs an empty (no parameters) Simple Registration extension.
|
SRegMessage(ParameterList params)
Constructs an Simple Registration extension with a specified list of
parameters.
|
Modifier and Type | Method and Description |
---|---|
MessageExtension |
getExtension(ParameterList parameterList,
boolean isRequest)
Instantiates the apropriate Simple Registration object
(request / response) for the supplied parameter list.
|
ParameterList |
getParameters()
Gets ParameterList containing the Simple Registration extension-specific
parameters.
|
java.lang.String |
getParameterValue(java.lang.String name)
Gets a the value of the parameter with the specified name.
|
java.lang.String |
getTypeUri()
Gets the Type URI that identifies the Simple Registration extension.
|
java.lang.String |
multivalDecode(java.lang.String value)
Decodes a string value according to the conventions for supporting
multiple values for a parameter (commas and backslashes are escaped).
|
java.lang.String |
multivalEncode(java.lang.String value)
Encodes a string value according to the conventions for supporting
multiple values for a parameter (commas and backslashes are escaped).
|
boolean |
providesIdentifier()
Simple Registration doesn't implement authentication services.
|
void |
setParameters(ParameterList params)
Sets the extension's parameters to the supplied list.
|
void |
setTypeUri(java.lang.String typeUri)
Sets the SREG type URI.
|
boolean |
signRequired()
Simple registration parameters are REQUIRED to be signed.
|
private static org.apache.commons.logging.Log _log
private static final boolean DEBUG
public static final java.lang.String OPENID_NS_SREG
public static final java.lang.String OPENID_NS_SREG11
protected ParameterList _parameters
The openid.
private java.lang.String _typeUri
public SRegMessage()
public SRegMessage(ParameterList params)
The parameter names in the list should not contain the
openid.
public java.lang.String getTypeUri()
getTypeUri
in interface MessageExtension
getTypeUri
in interface MessageExtensionFactory
public void setTypeUri(java.lang.String typeUri)
public ParameterList getParameters()
The openid.
The openid.ns.
getParameters
in interface MessageExtension
Message
public java.lang.String getParameterValue(java.lang.String name)
name
- The name of the parameter,
without the openid.public void setParameters(ParameterList params)
The parameter names in the list should not contain the
openid.
setParameters
in interface MessageExtension
Message
public java.lang.String multivalEncode(java.lang.String value)
value
- String value to be encoded.public java.lang.String multivalDecode(java.lang.String value)
value
- String value to be decoded.public boolean providesIdentifier()
providesIdentifier
in interface MessageExtension
public boolean signRequired()
signRequired
in interface MessageExtension
public MessageExtension getExtension(ParameterList parameterList, boolean isRequest) throws MessageException
getExtension
in interface MessageExtensionFactory
parameterList
- The Simple Registration specific parameters
(without the openid.isRequest
- Indicates whether the parameters were
extracted from an OpenID request (true),
or from an OpenID response.MessageException
- If a Simple Registration object could not be
instantiated from the supplied parameter list.Copyright 2006-2008 Sxip Identity Corporation