public class Artifact
extends java.lang.Object
The artifact consists of the base64 encoding of the following byte format:
0x0001
for SAML
version 1.0, but may hold different values for other profiles.
Constructor and Description |
---|
Artifact()
Creates a new
Artifact instance with
TypeCode = 0x0001 and null
values for SourceID and AssertionHandle. |
Artifact(byte[] artifactBytes)
Creates a new
Artifact instance by
parsing the TypeCode, SourceID and
AssertionHandle from the given byte array. |
Artifact(byte[] sourceID,
byte[] assertionHandle)
Creates a new
Artifact instance with
TypeCode = 0x0001 and the given
SourceID and AssertionHandle. |
Artifact(short typeCode,
byte[] sourceID,
byte[] assertionHandle)
Creates a new
Artifact instance with
the given TypeCode, SourceID and
AssertionHandle. |
Artifact(java.lang.String artifactString)
Creates a new
Artifact instance by
parsing the TypeCode, SourceID and
AssertionHandle from the given base64-encoded
artifact string. |
Modifier and Type | Method and Description |
---|---|
byte[] |
getAssertionHandle()
Returns the assertion handle of this SAML artifact.
|
byte[] |
getBytes()
Returns the bytes of this SAML artifact.
|
byte[] |
getSourceID()
Returns the source ID of this SAML artifact.
|
short |
getTypeCode()
Returns the type code of this SAML artifact.
|
void |
setAssertionHandle(byte[] assertionHandle)
Sets the assertion handle of this SAML artifact.
|
void |
setSourceID(byte[] sourceID)
Sets the source ID of this SAML artifact.
|
void |
setTypeCode(short typeCode)
Sets the type code of this SAML artifact.
|
void |
setValue(byte[] artifactBytes)
Sets the value of this SAML artifact, and parses
the TypeCode, SourceID and
AssertionHandle from the given byte array.
|
void |
setValue(java.lang.String artifactString)
Sets the value of this SAML artifact, and parses
the TypeCode, SourceID and
AssertionHandle from the given string.
|
java.lang.String |
toString()
Returns the base64-encoded artifact string.
|
public Artifact()
Artifact
instance with
TypeCode = 0x0001
and null
values for SourceID and AssertionHandle.public Artifact(byte[] sourceID, byte[] assertionHandle)
Artifact
instance with
TypeCode = 0x0001
and the given
SourceID and AssertionHandle.sourceID
- The identifier for the artifact's source site.assertionHandle
- The reference value for the assertion on the source site.java.lang.IllegalArgumentException
- If the given source ID or assertion handle does not
conform to the format defined in the SAML 1.0 specification.public Artifact(short typeCode, byte[] sourceID, byte[] assertionHandle)
Artifact
instance with
the given TypeCode, SourceID and
AssertionHandle.typeCode
- The type code for this artifact.sourceID
- The identifier for the artifact's source site.assertionHandle
- The reference value for the assertion on the source site.java.lang.IllegalArgumentException
- If the given source ID or assertion handle does not
conform to the format defined in the SAML 1.0 specification.public Artifact(java.lang.String artifactString)
Artifact
instance by
parsing the TypeCode, SourceID and
AssertionHandle from the given base64-encoded
artifact string.artifactString
- A base64-encoded SAML artifact string that conforms
to the format defined in the SAML 1.0 specification.java.lang.IllegalArgumentException
- If the artifact does not conform to the format
defined in the SAML 1.0 specification.public Artifact(byte[] artifactBytes)
Artifact
instance by
parsing the TypeCode, SourceID and
AssertionHandle from the given byte array.artifactBytes
- The bytes of a SAML artifact that conforms
to the format defined in the SAML 1.0 specification.java.lang.IllegalArgumentException
- If the artifact does not conform to the format
defined in the SAML 1.0 specification.public short getTypeCode()
public void setTypeCode(short typeCode)
typeCode
- The type code for this artifact.public byte[] getSourceID()
null
if none has been set.public void setSourceID(byte[] sourceID)
sourceID
- The identifier for the artifact's source site.java.lang.IllegalArgumentException
- If the given source ID does not conform to
the format defined in the SAML 1.0 specification.public byte[] getAssertionHandle()
null
if none has been set.public void setAssertionHandle(byte[] assertionHandle)
assertionHandle
- The reference value for the assertion on the source site.java.lang.IllegalArgumentException
- If the given assertion handle does not conform to
the format defined in the SAML 1.0 specification.public byte[] getBytes()
public java.lang.String toString()
toString
in class java.lang.Object
public void setValue(byte[] artifactBytes)
artifactBytes
- The bytes of a SAML artifact that conforms
to the format defined in the SAML 1.0 specification.java.lang.IllegalArgumentException
- If the artifact does not conform to the format
defined in the SAML 1.0 specification.public void setValue(java.lang.String artifactString)
artifactString
- A base64-encoded SAML artifact string that conforms
to the format defined in the SAML 1.0 specification.java.lang.IllegalArgumentException
- If the artifact does not conform to the format
defined in the SAML 1.0 specification.