|
Oracle Fusion Middleware SAML 2.0 Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10676-04 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.security.xmlsec.util.XMLNode
oracle.security.xmlsec.util.XMLElement
oracle.security.xmlsec.saml2.protocol.StatusResponseType
public class StatusResponseType
Represents a SAML response message. A SAML responder sends messages derived from this class.
Field Summary | |
---|---|
protected static java.lang.String |
VERSION |
Fields inherited from class oracle.security.xmlsec.util.XMLNode |
---|
node, systemId |
Constructor Summary | |
---|---|
|
StatusResponseType(org.w3c.dom.Document owner) Creates a new StatusResponseType instance. |
protected |
StatusResponseType(org.w3c.dom.Document owner, java.lang.String nsURI, java.lang.String localName) Creates a new StatusResponseType instance. |
|
StatusResponseType(org.w3c.dom.Element element) Creates a new StatusResponseType instance from the given Element node. |
|
StatusResponseType(org.w3c.dom.Element element, java.lang.String systemId) Creates a new StatusResponseType instance from the given Element node. |
Method Summary | |
---|---|
oracle.security.xmlsec.dsig.XSSignature |
addSignature(java.lang.String signatureMethod, java.lang.String c14nMethod) Creates a new XML-DSIG Signature element and inserts it into this element, replacing any exisiting XML-DSIG Signature element. |
oracle.security.xmlsec.dsig.XSSignature |
addSignature(java.lang.String signatureMethod, java.lang.String c14nMethod, java.lang.String digestMethod) Creates a new XML-DSIG Signature element and inserts it into this element, replacing any exisiting XML-DSIG Signature element. |
protected void |
clearSignature() Removes any exisiting XML-DSIG Signature elements from this message. |
java.lang.String |
getConsent() Indicates whether consent has been obtained in sending this StatusResponseType . |
java.lang.String |
getDestination() Returns the address for which this StatusResponseType is intended. |
Extensions |
getExtensions() Returns the SAML protocols extensions. |
java.lang.String |
getID() Returns the identifier attribute for this StatusResponseType . |
java.lang.String |
getInResponseTo() Returns the identifier of the request to which this response corresponds. |
java.util.Date |
getIssueInstant() Returns the time instant of issual of this StatusResponseType . |
Issuer |
getIssuer() Returns the issuer of this StatusResponseType . |
oracle.security.xmlsec.dsig.XSSignature |
getSignature() Returns the XML Signature child element from this element. |
Status |
getStatus() Gets the status of the StatusResponseType. |
java.lang.String |
getVersion() Returns the version this StatusResponseType . |
protected oracle.security.xmlsec.util.QName |
getXsiType() Returns the XML Schema xsi:type attribute. |
boolean |
isSigned() Indicates if this element was signed. |
void |
setConsent(java.lang.String consent) Sets whether consent has been obtained in sending this StatusResponseType . |
void |
setDestination(java.lang.String destURI) Sets the address for which this StatusResponseType is intended. |
void |
setExtensions(Extensions extension) Sets the SAML protocol extensions. |
void |
setID(java.lang.String requestID) Sets the identifier attribute for this StatusResponseType object. |
void |
setInResponseTo(java.lang.String requestID) Sets the identifier of the request to which this response corresponds. |
void |
setIssueInstant(java.util.Date issueInstant) Sets the time instant of issual of this StatusResponseType as a UTC time. |
void |
setIssuer(NameID issuer) Sets the issuer of this StatusResponseType . |
void |
setStatus(Status status) Sets the status of the StatusResponseType. |
void |
setVersion(java.lang.String ver) Sets the version of this StatusResponseType . |
protected void |
setXsiType(oracle.security.xmlsec.util.QName type) Set the XML Schema xsi:type attribute. |
void |
sign(java.security.PrivateKey privateKey, java.security.cert.X509Certificate cert) Signs this element with the given private key, and includes the given certificate in the KeyInfo child element of the resulting XML-DSIG Signature element. |
void |
sign(java.security.PrivateKey privateKey, java.security.cert.X509Certificate cert, java.lang.String c14nMethod) Signs this element with the given private key, and includes the given certificate in the KeyInfo child element of the resulting XML-DSIG Signature element. |
boolean |
verify() Verifies the signature using a key obtained either from the KeyInfo element (if any is present) or via the oracle.security.xmlsec.keys.retrieval.KeyRetriever mechanism. |
boolean |
verify(java.security.PublicKey publicKey) Verifies the signature with the given public key. |
Methods inherited from class oracle.security.xmlsec.util.XMLElement |
---|
addNSPrefixAttr, addNSPrefixAttr, addNSPrefixAttrDefault, addNSPrefixAttrDefault, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getChildElementsByTagName, getChildElementsByTagName, getChildElementsByTagNameNS, getChildElementsByTagNameNS, getDefaultNSPrefix, getElement, getElementsByTagName, getElementsByTagNameNS, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setDefaultNSPrefix |
Methods inherited from class oracle.security.xmlsec.util.XMLNode |
---|
appendChild, appendChild, appendTo, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNode, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getSystemId, hasAttributes, hasChildNodes, insertBefore, insertBefore, isSupported, normalize, removeChild, removeChild, replaceChild, replaceChild, setNodeValue, setPrefix, setSystemId, toBytesXML, toStringXML |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static java.lang.String VERSION
Constructor Detail |
---|
public StatusResponseType(org.w3c.dom.Element element) throws org.w3c.dom.DOMException
StatusResponseType
instance from the given Element node.
element
- A samlp:StatusResponseType element.org.w3c.dom.DOMException
public StatusResponseType(org.w3c.dom.Element element, java.lang.String systemId) throws org.w3c.dom.DOMException
StatusResponseType
instance from the given Element node.
element
- A samlp:StatusResponseType element.systemId
- The URI string system ID for the StatusResponseType
.org.w3c.dom.DOMException
public StatusResponseType(org.w3c.dom.Document owner) throws org.w3c.dom.DOMException
StatusResponseType
instance.
owner
- The owner document of the new StatusResponseType.org.w3c.dom.DOMException
protected StatusResponseType(org.w3c.dom.Document owner, java.lang.String nsURI, java.lang.String localName) throws org.w3c.dom.DOMException
StatusResponseType
instance. This constructor is for use in subclass for extension of the StatusResponseType element.
owner
- The owner document of the new StatusResponseType.nsURI
- The namespace URI in which the new StatusResponseType is to be created.localName
- The localName of the element represented by the class that extends this class.org.w3c.dom.DOMException
Method Detail |
---|
protected void setXsiType(oracle.security.xmlsec.util.QName type)
type
- The QName
reference.protected oracle.security.xmlsec.util.QName getXsiType()
QName
reference or null
if not specified.public void setVersion(java.lang.String ver)
StatusResponseType
.ver
- The version number String.public java.lang.String getVersion()
StatusResponseType
.null
if none has been set.public void setID(java.lang.String requestID)
StatusResponseType
object.requestID
- A unique identifier String.public java.lang.String getID()
StatusResponseType
.null
if none has been set.public void setIssueInstant(java.util.Date issueInstant)
StatusResponseType
as a UTC time.issueInstant
- The Date
object representing the issue time.public java.util.Date getIssueInstant()
StatusResponseType
.Date
object representing the issue time or null
if none has been set.public void setDestination(java.lang.String destURI)
StatusResponseType
is intended.destURI
- An URI
reference identifying the response destination.public java.lang.String getDestination()
StatusResponseType
is intended.URI
String or null
if none has been set.public void setConsent(java.lang.String consent)
StatusResponseType
.consent
- A URI
value.public java.lang.String getConsent()
StatusResponseType
.URI
value or null
if none has been set.public void setIssuer(NameID issuer)
StatusResponseType
.issuer
- The issuer's name identifier.public Issuer getIssuer()
StatusResponseType
.Issuer
of the issuer or null
if none has been set.public void setExtensions(Extensions extension)
extension
- A Extension
object.public Extensions getExtensions()
Extension
object or null
if none has been set.public void setInResponseTo(java.lang.String requestID)
requestID
- A unique identifier.public java.lang.String getInResponseTo()
null
if none has been set.public void setStatus(Status status)
status
- A Status
object containing response status information.public Status getStatus()
Status
object.public oracle.security.xmlsec.dsig.XSSignature getSignature()
XSSignature
object or null
if no signature is present.public boolean isSigned()
true
if a signature is present, false
otherwise.public void sign(java.security.PrivateKey privateKey, java.security.cert.X509Certificate cert) throws oracle.security.xmlsec.dsig.SigningException
KeyInfo
child element of the resulting XML-DSIG Signature
element. The default canonicalization method is XML-EXCLUSIVE-C14N.privateKey
- The private key to use for the signature computation.cert
- The X509
certificate corresponding to the private key.oracle.security.xmlsec.dsig.SigningException
public void sign(java.security.PrivateKey privateKey, java.security.cert.X509Certificate cert, java.lang.String c14nMethod) throws oracle.security.xmlsec.dsig.SigningException
KeyInfo
child element of the resulting XML-DSIG Signature
element.privateKey
- The private key to use for the signature computation.cert
- The X509
certificate corresponding to the private key.c14nMethod
- The URI identifying the canonicalization method to be applied to the SignedInfo structure.oracle.security.xmlsec.dsig.SigningException
public oracle.security.xmlsec.dsig.XSSignature addSignature(java.lang.String signatureMethod, java.lang.String c14nMethod)
Signature
element and inserts it into this element, replacing any exisiting XML-DSIG Signature
element. The default message digest algorithm is SHA-1.
Note: This method does not compute the SignatureValue
or create a KeyInfo
child element for the Signature
element so, at a minimum, one of the sign()
methods must be invoked on the returned XSSignature
object.
This method is intended for use by developers who need to customize the Signature
element (e.g., add custom Transform
elements) the computation of the SignatureValue
(e.g., using an HMAC signature algorithm) or the KeyInfo
element. For most developers, either the #sign(PrivateKey, X509)
or #sign(PrivateKey, X509, String)
method should be sufficient.
signatureMethod
- The value of the Algorithm
attribute of the SignatureMethod
element contained within the new Signature
element's SignedInfo
child element (e.g., oracle.security.xmlsec.util.XMLURI.alg_rsaWithSHA1
).c14nMethod
- The value of the Algorithm
attribute of the CanonicalizationMethod
element contained within the new Signature
element's SignedInfo
child element (e.g., oracle.security.xmlsec.util.XMLURI.alg_c14nWithComments
).oracle.security.xmlsec.dsig.XSSignature
object.public oracle.security.xmlsec.dsig.XSSignature addSignature(java.lang.String signatureMethod, java.lang.String c14nMethod, java.lang.String digestMethod)
Signature
element and inserts it into this element, replacing any exisiting XML-DSIG Signature
element.
Note: This method does not compute the SignatureValue
or create a KeyInfo
child element for the Signature
element so, at a minimum, one of the sign()
methods must be invoked on the returned XSSignature
object.
This method is intended for use by developers who need to customize the Signature
element (e.g., add custom Transform
elements) the computation of the SignatureValue
(e.g., using an HMAC signature algorithm) or the KeyInfo
element. For most developers, either the #sign(PrivateKey, X509)
or #sign(PrivateKey, X509, String)
method should be sufficient.
signatureMethod
- The value of the Algorithm
attribute of the SignatureMethod
element contained within the new Signature
element's SignedInfo
child element (e.g., oracle.security.xmlsec.util.XMLURI.alg_rsaWithSHA1
).c14nMethod
- The value of the Algorithm
attribute of the CanonicalizationMethod
element contained within the new Signature
element's SignedInfo
child element (e.g., oracle.security.xmlsec.util.XMLURI.alg_c14nWithComments
).digestMethod
- The value of the Algorithm
attribute of the DigestMethod
element contained within the new Signature
element's Reference
child element (e.g., oracle.security.xmlsec.util.XMLURI.alg_sha1
).oracle.security.xmlsec.dsig.XSSignature
object.public boolean verify() throws oracle.security.xmlsec.dsig.VerifyException
oracle.security.xmlsec.keys.retrieval.KeyRetriever
mechanism. Any Manifests referenced by the signature will be validated.true
if the verification succeeded, or false
if the verification failed.oracle.security.xmlsec.dsig.VerifyException
- If an error occurs while verifying the signature, or if no signature is present in this message.public boolean verify(java.security.PublicKey publicKey) throws oracle.security.xmlsec.dsig.VerifyException
publicKey
- The public key used for verifying the signature.true
if the verification succeeded, or false
if the verification failed.oracle.security.xmlsec.dsig.VerifyException
- If an error occurs while verifying the signature, or if no signature is present in this message.protected void clearSignature()
|
Oracle Fusion Middleware SAML 2.0 Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10676-04 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |