Class SAML1ArtifactType0001

    • Field Detail

      • TYPE_CODE

        public static final byte[] TYPE_CODE
        Artifact type code (0x0001).
      • sourceID

        private byte[] sourceID
        20 byte artifact source ID.
      • assertionHandle

        private byte[] assertionHandle
        20 byte assertion handle.
    • Constructor Detail

      • SAML1ArtifactType0001

        public SAML1ArtifactType0001()
        Constructor.
      • SAML1ArtifactType0001

        public SAML1ArtifactType0001​(byte[] source,
                                     byte[] handle)
        Constructor.
        Parameters:
        source - 20 byte source ID of the artifact
        handle - 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 Detail

      • parseArtifact

        public static SAML1ArtifactType0001 parseArtifact​(byte[] artifact)
        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

        public byte[] getSourceID()
        Gets the 20 byte source ID of the artifact.
        Specified by:
        getSourceID in interface SAMLSourceIDArtifact
        Returns:
        the source ID of the artifact
      • setSourceID

        protected void setSourceID​(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

        public byte[] getAssertionHandle()
        Gets the artifiact's 20 byte assertion handle.
        Returns:
        artifiact's 20 byte assertion handle
      • setAssertionHandle

        public void setAssertionHandle​(byte[] handle)
        Sets the artifiact's 20 byte assertion handle.
        Parameters:
        handle - artifiact's 20 byte assertion handle
      • getRemainingArtifact

        public byte[] getRemainingArtifact()
        Gets the artifact bytes minus the type code.
        Specified by:
        getRemainingArtifact in class AbstractSAMLArtifact
        Returns:
        artifact bytes minus the type code