public abstract class RequestAbstractImpl extends Object implements RequestAbstract
Modifier and Type | Field and Description |
---|---|
protected String |
consent |
protected String |
destinationURI |
protected String |
elementName |
protected Extensions |
extensions |
protected boolean |
isMutable |
protected Boolean |
isSignatureValid |
protected boolean |
isSigned |
protected Date |
issueInstant |
protected Issuer |
nameID |
protected PublicKey |
publicKey |
protected String |
requestId |
protected String |
signatureString |
protected String |
signedXMLString |
protected String |
version |
Constructor and Description |
---|
RequestAbstractImpl() |
Modifier and Type | Method and Description |
---|---|
protected String |
getAttributesString() |
String |
getConsent()
Sets the value of the
Consent attribute. |
String |
getDestination()
Returns the value of the
Destination attribute. |
protected String |
getElements(boolean includeNSPrefix,
boolean declareNS) |
Extensions |
getExtensions()
Returns the
Extensions Object. |
String |
getID()
Returns the value of the
ID attribute. |
Date |
getIssueInstant()
Returns the value of
IssueInstant attribute. |
Issuer |
getIssuer()
Returns the
Issuer Object. |
String |
getSignature()
Returns the
Signature Object as a string. |
String |
getVersion()
Returns the value of the
Version attribute. |
protected void |
getXMLString(Set namespaces,
StringBuffer attrs,
StringBuffer childElements,
boolean includeNSPrefix,
boolean declareNS) |
boolean |
isMutable()
Returns true if object is mutable.
|
boolean |
isSignatureValid(Set<X509Certificate> verificationCerts)
Return whether the signature is valid or not.
|
boolean |
isSigned()
Returns true if message is signed.
|
void |
makeImmutable()
Makes this object immutable.
|
protected void |
parseDOMAttributes(Element element)
Parses attributes of the Docuemnt Element for this object.
|
protected void |
parseDOMChileElements(ListIterator iter)
Parses child elements of the Docuemnt Element for this object.
|
protected void |
parseDOMElement(Element element)
Parses the Docuemnt Element for this object.
|
void |
setConsent(String consent)
Sets the value of the Consent property.
|
void |
setDestination(String destinationURI)
Sets the value of the
Destination attribute. |
void |
setExtensions(Extensions extensions)
Sets the
Extensions Object. |
void |
setID(String id)
Sets the value of the
ID attribute. |
void |
setIssueInstant(Date dateTime)
Sets the value of
IssueInstant attribute. |
void |
setIssuer(Issuer nameID)
Sets the
Issuer object. |
void |
setVersion(String version)
Sets the value of the
Version attribute. |
void |
sign(PrivateKey privateKey,
X509Certificate cert)
Signs the Request.
|
String |
toXMLString()
Returns a String representation of this Object.
|
String |
toXMLString(boolean includeNSPrefix,
boolean declareNS)
Returns a String representation of this Object.
|
protected void |
validateData() |
protected void |
validateID(String requestID) |
protected void |
validateIssueInstant(String issueInstantStr) |
protected void |
validateVersion(String version) |
protected Issuer nameID
protected Extensions extensions
protected String requestId
protected String version
protected Date issueInstant
protected String destinationURI
protected String consent
protected boolean isSigned
protected Boolean isSignatureValid
protected PublicKey publicKey
protected boolean isMutable
protected String signatureString
protected String signedXMLString
protected String elementName
public void setIssuer(Issuer nameID) throws SAML2Exception
Issuer
object.setIssuer
in interface RequestAbstract
nameID
- the new Issuer
object.SAML2Exception
- if the object is immutable.getIssuer()
public Issuer getIssuer()
Issuer
Object.getIssuer
in interface RequestAbstract
Issuer
object.setIssuer(Issuer)
public String getSignature()
Signature
Object as a string.getSignature
in interface RequestAbstract
Signature
object as a string.public void sign(PrivateKey privateKey, X509Certificate cert) throws SAML2Exception
sign
in interface RequestAbstract
privateKey
- Signing keycert
- Certificate which contain the public key correlated to
the signing key; It if is not null, then the signature
will include the certificate; Otherwise, the signature
will not include any certificate.SAML2Exception
- if it could not sign the Request.public void setExtensions(Extensions extensions) throws SAML2Exception
Extensions
Object.setExtensions
in interface RequestAbstract
extensions
- the Extensions
object.SAML2Exception
- if the object is immutable.getExtensions()
public Extensions getExtensions()
Extensions
Object.getExtensions
in interface RequestAbstract
Extensions
object.setExtensions(Extensions)
public void setID(String id) throws SAML2Exception
ID
attribute.setID
in interface RequestAbstract
id
- the new value of ID
attribute.SAML2Exception
- if the object is immutable.getID()
public String getID()
ID
attribute.getID
in interface RequestAbstract
ID
attribute.setID(String)
public void setVersion(String version) throws SAML2Exception
Version
attribute.setVersion
in interface RequestAbstract
version
- the value of Version
attribute.SAML2Exception
- if the object is immutable.getVersion()
public String getVersion()
Version
attribute.getVersion
in interface RequestAbstract
Version
attribute.setVersion(String)
public void setIssueInstant(Date dateTime) throws SAML2Exception
IssueInstant
attribute.setIssueInstant
in interface RequestAbstract
dateTime
- new value of the IssueInstant
attribute.SAML2Exception
- if the object is immutable.getIssueInstant()
public Date getIssueInstant()
IssueInstant
attribute.getIssueInstant
in interface RequestAbstract
IssueInstant
attribute.setIssueInstant(Date)
public void setDestination(String destinationURI) throws SAML2Exception
Destination
attribute.setDestination
in interface RequestAbstract
destinationURI
- new value of Destination
attribute.SAML2Exception
- if the object is immutable.getDestination()
public String getDestination()
Destination
attribute.getDestination
in interface RequestAbstract
Destination
attribute.setDestination(String)
public void setConsent(String consent) throws SAML2Exception
setConsent
in interface RequestAbstract
consent
- , value of Consent property.SAML2Exception
- if the object is immutable.getConsent()
public String getConsent()
Consent
attribute.getConsent
in interface RequestAbstract
Consent
attribute.SAML2Exception
- if the object is immutable.setConsent(String)
public boolean isSigned()
isSigned
in interface RequestAbstract
public boolean isSignatureValid(Set<X509Certificate> verificationCerts) throws SAML2Exception
RequestAbstract
isSignatureValid
in interface RequestAbstract
verificationCerts
- Certificates containing the public keys which may be used for signature verification;
This certificate may also may be used to check against the certificate included in the
signature.SAML2Exception
- if the signature could not be verifiedpublic String toXMLString() throws SAML2Exception
toXMLString
in interface RequestAbstract
SAML2Exception
- if it could not create String objectpublic String toXMLString(boolean includeNSPrefix, boolean declareNS) throws SAML2Exception
toXMLString
in interface RequestAbstract
includeNSPrefix
- 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.SAML2Exception
- if it could not create String object.protected String getAttributesString() throws SAML2Exception
SAML2Exception
protected String getElements(boolean includeNSPrefix, boolean declareNS) throws SAML2Exception
SAML2Exception
public void makeImmutable()
makeImmutable
in interface RequestAbstract
public boolean isMutable()
isMutable
in interface RequestAbstract
protected void validateID(String requestID) throws SAML2Exception
SAML2Exception
protected void validateVersion(String version) throws SAML2Exception
SAML2Exception
protected void validateIssueInstant(String issueInstantStr) throws SAML2Exception
SAML2Exception
protected void validateData() throws SAML2Exception
SAML2Exception
protected void getXMLString(Set namespaces, StringBuffer attrs, StringBuffer childElements, boolean includeNSPrefix, boolean declareNS) throws SAML2Exception
SAML2Exception
protected void parseDOMElement(Element element) throws SAML2Exception
element
- the Document Element of this object.SAML2Exception
- if error parsing the Document Element.protected void parseDOMAttributes(Element element) throws SAML2Exception
element
- the Document Element of this object.SAML2Exception
- if error parsing the Document Element.protected void parseDOMChileElements(ListIterator iter) throws SAML2Exception
iter
- the child elements iterator.SAML2Exception
- if error parsing the Document Element.Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.