Package com.sun.identity.saml.protocol
Class AbstractResponse
- java.lang.Object
-
- com.sun.identity.saml.protocol.AbstractResponse
-
- Direct Known Subclasses:
FSLogoutResponse,FSNameIdentifierMappingResponse,FSNameRegistrationResponse,Response
public abstract class AbstractResponse extends Object
ThisAbstractResponseclass is an abstract base class for all SAML Response insamlpnamespace. It corresponds toResponseAbstractTypein SAML protocol schema.
-
-
Field Summary
Fields Modifier and Type Field Description protected StringinResponseToprotected DateissueInstantprotected intmajorVersionprotected intminorVersionprotected Stringrecipientprotected StringresponseIDprotected Elementsignatureprotected booleansignedprotected booleanvalidprotected booleanvalidationDone
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractResponse()Default constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description StringgetInResponseTo()Gets theInResponseToof the Response.DategetIssueInstant()Returns theIssueInstantof the Response.intgetMajorVersion()Gets theMajorVersionof the Response.intgetMinorVersion()Gets theMinorVersionof the Response.StringgetRecipient()Gets the recipient of the Response.StringgetResponseID()Gets theResponseIDof the Response.ElementgetSignature()Gets the signature of the Response.booleanisSignatureValid()Returns whether the signature on the object is valid or not.booleanisSigned()Return whether the object is signed or not.booleansetInResponseTo(String inResponseTo)Set theInResponseToof the Response.booleansetIssueInstant(Date issueInstant)Set theIssueInstantof the Response.voidsetMajorVersion(int majorVersion)Sets theMajorVersionof the Response.voidsetMinorVersion(int minorVersion)Sets theMinorVersionof the Response.booleansetRecipient(String recipient)Set the Recipient attribute of the Response.booleansetResponseID(String responseID)Set theResponseIDof the Response.booleansetSignature(Element elem)Set the signature for the Response.abstract voidsignXML()An abstract method that signs the object.
-
-
-
Field Detail
-
responseID
protected String responseID
-
inResponseTo
protected String inResponseTo
-
majorVersion
protected int majorVersion
-
minorVersion
protected int minorVersion
-
signature
protected Element signature
-
issueInstant
protected Date issueInstant
-
recipient
protected String recipient
-
signed
protected boolean signed
-
valid
protected boolean valid
-
validationDone
protected boolean validationDone
-
-
Method Detail
-
isSigned
public boolean isSigned()
Return whether the object is signed or not.- Returns:
- true if the object is signed; false otherwise.
-
isSignatureValid
public boolean isSignatureValid()
Returns whether the signature on the object is valid or not.- Returns:
- boolean true if the signature is valid; false otherwise.
-
signXML
public abstract void signXML() throws SAMLExceptionAn abstract method that signs the object.- Throws:
SAMLException- if could not sign the object.
-
getResponseID
public String getResponseID()
Gets theResponseIDof the Response.- Returns:
- the
ResponseIDof the Response.
-
setResponseID
public boolean setResponseID(String responseID)
Set theResponseIDof the Response.- Parameters:
responseID- A String that is theResponseIDattribute of the Response.- Returns:
- true if the operation is successful.
-
getInResponseTo
public String getInResponseTo()
Gets theInResponseToof the Response.- Returns:
- the
InResponseToof the Response.
-
setInResponseTo
public boolean setInResponseTo(String inResponseTo)
Set theInResponseToof the Response.- Parameters:
inResponseTo- TheInResponseToattribute of the Response.- Returns:
- true if the operation is successful.
-
getMajorVersion
public int getMajorVersion()
Gets theMajorVersionof the Response.- Returns:
- The
MajorVersionof the Response.
-
getMinorVersion
public int getMinorVersion()
Gets theMinorVersionof the Response.- Returns:
- The
MinorVersionof the SAML response.
-
setMajorVersion
public void setMajorVersion(int majorVersion)
Sets theMajorVersionof the Response.- Parameters:
majorVersion- the intended major version of SAML response.
-
setMinorVersion
public void setMinorVersion(int minorVersion)
Sets theMinorVersionof the Response.- Parameters:
minorVersion- the intended minor version of SAML response.
-
getSignature
public Element getSignature()
Gets the signature of the Response.- Returns:
- The signature element of the Response. null is returned if the Response has no ds:Signature.
-
setSignature
public boolean setSignature(Element elem)
Set the signature for the Response.- Parameters:
elem-ds:Signatureelement- Returns:
- true if the operation succeeds.
-
getIssueInstant
public Date getIssueInstant()
Returns theIssueInstantof the Response.- Returns:
- the
IssueInstantof the Response.
-
setIssueInstant
public boolean setIssueInstant(Date issueInstant)
Set theIssueInstantof the Response.- Parameters:
issueInstant- a Date object representing the time when the Response is issued.- Returns:
- true if the operation succeeds.
-
getRecipient
public String getRecipient()
Gets the recipient of the Response.- Returns:
- The Recipient.
-
setRecipient
public boolean setRecipient(String recipient)
Set the Recipient attribute of the Response.- Parameters:
recipient- A String representing the Recipient attribute of the Response.- Returns:
- true if the operation is successful;
-
-