com.sun.identity.federation.message
Class FSNameIdentifierMappingRequest
java.lang.Object
com.sun.identity.saml.protocol.AbstractRequest
com.sun.identity.federation.message.FSNameIdentifierMappingRequest
public class FSNameIdentifierMappingRequest
- extends AbstractRequest
The class FSNameIdentifierMappingRequest
is used to
create or parse NameIdentifierMappingRequest.
Method Summary |
NameIdentifier |
getNameIdentifier()
Returns the NameIdentifier object qualified by the
requesting service provider . |
String |
getProviderID()
Returns the ProviderID attribute. |
String |
getTargetNamespace()
Returns the value of TargetNamespace attribute. |
static FSNameIdentifierMappingRequest |
parseXML(String xml)
Returns FSNameIdentifierMappingRequest object. |
void |
signXML()
Signs the XML document representing
NameIdentifierMappingRequest using the certificate
indicated by the property "com.sun.identity.saml.xmlsig.certalias"
in AMConfig.properties file. |
void |
signXML(String certAlias)
Signs the XML document representing
NameIdentifierMappingRequest using the specified
certificate. |
String |
toXMLString()
Returns the string representation of this object. |
String |
toXMLString(boolean includeNS,
boolean declareNS)
Returns the string representation of this object. |
String |
toXMLString(boolean includeNS,
boolean declareNS,
boolean includeHeader)
Returns a String representation of the <samlp:Response> element. |
Methods inherited from class com.sun.identity.saml.protocol.AbstractRequest |
addRespondWith, getIssueInstant, getMajorVersion, getMinorVersion, getRequestID, getRespondWith, getSignature, isSignatureValid, isSigned, setIssueInstant, setMajorVersion, setMinorVersion, setRequestID, setSignature |
FSNameIdentifierMappingRequest
public FSNameIdentifierMappingRequest(String providerID,
NameIdentifier nameIdentifier,
String targetNamespace)
throws FSMsgException
- Constructor to create
FSNameIdentifierMappingRequest.
- Parameters:
providerID
- the requesting provider's IDnameIdentifier
- the NameIdentifier
qualified by the
requesting service providertargetNamespace
- the provider ID of the other service provider
which the requesting service provider would
subsequently communicate with
- Throws:
FSMsgException
- if there is an error creating the object.
FSNameIdentifierMappingRequest
public FSNameIdentifierMappingRequest(Element root)
throws FSMsgException
- Constructor to create
FSNameIdentifierMappingRequest from
the Document Element.
- Parameters:
root
- the NameIdentifierMappingRequest
Document
element.
- Throws:
FSMsgException
- if there is an error.
parseXML
public static FSNameIdentifierMappingRequest parseXML(String xml)
throws FSMsgException
- Returns
FSNameIdentifierMappingRequest
object. This
object is created by parsing the XML
string.
- Parameters:
xml
- XML
String
- Returns:
- the
FSNameIdentifierMappingRequest
object.
- Throws:
FSMsgException
- if there is an error creating this object.
getProviderID
public String getProviderID()
- Returns the
ProviderID
attribute. This
is the requesting Service Providers's identifier.
- Returns:
- the
ProviderID
attribute.
getNameIdentifier
public NameIdentifier getNameIdentifier()
- Returns the
NameIdentifier
object qualified by the
requesting service provider .
- Returns:
- the
NameIdentifier
object qualified by the
requesting service provider .
getTargetNamespace
public String getTargetNamespace()
- Returns the value of
TargetNamespace
attribute.
- Returns:
- the value of
TargetNamespace
attribute.
signXML
public void signXML()
throws SAMLException
- Signs the XML document representing
NameIdentifierMappingRequest
using the certificate
indicated by the property "com.sun.identity.saml.xmlsig.certalias"
in AMConfig.properties file.
- Specified by:
signXML
in class AbstractRequest
- Throws:
SAMLException
- if there is an error signing the XML document.
signXML
public void signXML(String certAlias)
throws SAMLException
- Signs the XML document representing
NameIdentifierMappingRequest
using the specified
certificate.
- Parameters:
certAlias
- the alias (name) of the certificate used for signing
the XML document
- Throws:
SAMLException
- it there is an error.
toXMLString
public String toXMLString()
throws FSMsgException
- Returns the string representation of this object.
This method translates the response to an XML document string.
- Returns:
- An XML String representing the response. NOTE: this is a
complete SAML response xml string with ResponseID,
MajorVersion, etc.
- Throws:
FSMsgException
toXMLString
public String toXMLString(boolean includeNS,
boolean declareNS)
throws FSMsgException
- Returns the string representation of this object.
- Returns:
- An XML String representing the response.
- Throws:
FSMsgException
- if there is an error converting
this object ot a string.
toXMLString
public String toXMLString(boolean includeNS,
boolean declareNS,
boolean includeHeader)
throws FSMsgException
- Returns a String representation of the <samlp:Response> element.
- Parameters:
includeNS
- Determines whether or not the namespace qualifier
is prepended to the Element when converteddeclareNS
- Determines whether or not the namespace is declared
within the Element.includeHeader
- Determines whether the output include the xml
declaration header.
- Returns:
- a string containing the valid XML for this element
- Throws:
FSMsgException
- if there is an error converting
this object ot a string.