Class SAML1ArtifactType0001
java.lang.Object
org.opensaml.saml.common.binding.artifact.AbstractSAMLArtifact
org.opensaml.saml.saml1.binding.artifact.AbstractSAML1Artifact
org.opensaml.saml.saml1.binding.artifact.SAML1ArtifactType0001
- All Implemented Interfaces:
SAMLArtifact,SAMLSourceIDArtifact,SAML1Artifact
SAML 1.X Type 0x0001 Artifact. SAML 1, type 1, artifacts contains a 2 byte type code with a value of 1 followed by a
20 byte source ID followed by a 20 byte assertion handle.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate byte[]20 byte assertion handle.private byte[]20 byte artifact source ID.static final byte[]Artifact type code (0x0001). -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.SAML1ArtifactType0001(byte[] source, byte[] handle) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Gets the artifiact's 20 byte assertion handle.byte[]Gets the artifact bytes minus the type code.byte[]Gets the 20 byte source ID of the artifact.static SAML1ArtifactType0001parseArtifact(byte[] artifact) Constructs a SAML 1 artifact from its byte array representation.voidsetAssertionHandle(byte[] handle) Sets the artifiact's 20 byte assertion handle.protected voidsetSourceID(byte[] newSourceID) Sets the 20 byte source ID of the artifact.Methods inherited from class org.opensaml.saml.common.binding.artifact.AbstractSAMLArtifact
base64Encode, equals, getArtifactBytes, getTypeCode, hashCode, hexEncode, setTypeCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opensaml.saml.common.binding.artifact.SAMLArtifact
getArtifactBytes, getTypeCode
-
Field Details
-
TYPE_CODE
@Nonnull public static final byte[] TYPE_CODEArtifact type code (0x0001). -
sourceID
@Nonnull private byte[] sourceID20 byte artifact source ID. -
assertionHandle
@Nonnull private byte[] assertionHandle20 byte assertion handle.
-
-
Constructor Details
-
SAML1ArtifactType0001
public SAML1ArtifactType0001()Constructor. -
SAML1ArtifactType0001
public SAML1ArtifactType0001(@Nonnull byte[] source, @Nonnull byte[] handle) Constructor.- Parameters:
source- 20 byte source ID of the artifacthandle- 20 byte assertion handle of the artifact- Throws:
IllegalArgumentException- thrown if the given source ID or message handle are not of the current length (20 bytes)
-
-
Method Details
-
parseArtifact
Constructs a SAML 1 artifact from its byte array representation.- Parameters:
artifact- the byte array representing the artifact- Returns:
- the artifact created from the byte array
- Throws:
IllegalArgumentException- thrown if the artifact is not the right type or lenght (42 bytes) or is not of the correct type (0x0001)
-
getSourceID
@Nonnull public byte[] getSourceID()Gets the 20 byte source ID of the artifact.- Specified by:
getSourceIDin interfaceSAMLSourceIDArtifact- Returns:
- the source ID of the artifact
-
setSourceID
protected void setSourceID(@Nonnull byte[] newSourceID) Sets the 20 byte source ID of the artifact.- Parameters:
newSourceID- 20 byte source ID of the artifact- Throws:
IllegalArgumentException- thrown if the given source ID is not 20 bytes
-
getAssertionHandle
@Nonnull public byte[] getAssertionHandle()Gets the artifiact's 20 byte assertion handle.- Returns:
- artifiact's 20 byte assertion handle
-
setAssertionHandle
public void setAssertionHandle(@Nonnull byte[] handle) Sets the artifiact's 20 byte assertion handle.- Parameters:
handle- artifiact's 20 byte assertion handle
-
getRemainingArtifact
@Nonnull public byte[] getRemainingArtifact()Gets the artifact bytes minus the type code.- Specified by:
getRemainingArtifactin classAbstractSAMLArtifact- Returns:
- artifact bytes minus the type code
-