Package com.sun.identity.saml.protocol
Class AssertionArtifact
- java.lang.Object
-
- com.sun.identity.saml.protocol.AssertionArtifact
-
- Direct Known Subclasses:
FSAssertionArtifact
public class AssertionArtifact extends Object
This class represents theAssertionArtifactelement in SAML protocol schema. Current implementation supports TYPE 1 artifact only. Other type of artifact can be supported by extending this class.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAssertionArtifact()This is the default constructor of assertion artifact.AssertionArtifact(String theArtifact)This constructor is used to construct an assertion artifact.AssertionArtifact(String id, String handle)This constructor will be used at the sender side to create a newAssertionArtifact.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAssertionArtifact()Gets the artifact.StringgetAssertionHandle()Gets theAssertionHandleof the artifact.StringgetSourceID()Returns theSourceIDof the artifact.byte[]getTypeCode()Gets thetypeCodeof the artifact.StringtoString()Translates theAssertionArtifactto an XML document String based on the SAML schema.StringtoString(boolean includeNS, boolean declareNS)Creates a String representation of the<samlp:AssertionArtifact>element.
-
-
-
Constructor Detail
-
AssertionArtifact
protected AssertionArtifact()
This is the default constructor of assertion artifact.
-
AssertionArtifact
public AssertionArtifact(String theArtifact) throws SAMLException
This constructor is used to construct an assertion artifact.- Parameters:
theArtifact- is the string that is generated by a provider.- Throws:
SAMLException- if an error occurs.
-
AssertionArtifact
public AssertionArtifact(String id, String handle) throws SAMLException
This constructor will be used at the sender side to create a newAssertionArtifact.- Parameters:
id- A string that represents thesourceID.handle- A string that represents theassertionHandle.- Throws:
SAMLException- if wrong input or could not encode the artifact.
-
-
Method Detail
-
getAssertionArtifact
public String getAssertionArtifact()
Gets the artifact.- Returns:
- the string format of the artifact. It's base64 encoded.
-
getSourceID
public String getSourceID()
Returns theSourceIDof the artifact.- Returns:
- The
SourceIDof the artifact.
-
getAssertionHandle
public String getAssertionHandle()
Gets theAssertionHandleof the artifact. The result will be decoded.- Returns:
- The
AssertionHandleof the artifact.
-
getTypeCode
public byte[] getTypeCode()
Gets thetypeCodeof the artifact.- Returns:
- The byte array of the
TypeCodefor the artifact.
-
toString
public String toString()
Translates theAssertionArtifactto an XML document String based on the SAML schema.
-
toString
public String toString(boolean includeNS, boolean declareNS)
Creates a String representation of the<samlp:AssertionArtifact>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.- Returns:
- A string containing the valid XML for this element
-
-