Class SAML1ArtifactType0002

    • Field Detail

      • TYPE_CODE

        public static final byte[] TYPE_CODE
        Artifact type code (0x0002).
      • assertionHandle

        private byte[] assertionHandle
        20 byte assertion handle.
      • sourceLocation

        private String sourceLocation
        Artifact source location component.
    • Constructor Detail

      • SAML1ArtifactType0002

        public SAML1ArtifactType0002()
        Constructor.
      • SAML1ArtifactType0002

        public SAML1ArtifactType0002​(byte[] handle,
                                     String location)
        Constructor.
        Parameters:
        handle - 20 byte assertion handle artifact component
        location - source location artifact component
        Throws:
        IllegalArgumentException - thrown if the given assertion handle is not 20 bytes or the source location is null or empty
    • Method Detail

      • parseArtifact

        public static SAML1ArtifactType0002 parseArtifact​(byte[] artifact)
        Constructs a SAML 1 artifact from its byte representation.
        Parameters:
        artifact - the byte array representing the artifact
        Returns:
        the artifact parsed from the byte representation
        Throws:
        IllegalArgumentException - thrown if the artifact type is not 0x0002
      • 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
      • setSourceLocation

        protected void setSourceLocation​(String newLocation)
        Sets source location component of this artifact.
        Parameters:
        newLocation - source location component of this artifact
        Throws:
        IllegalArgumentException - thrown if the given location is empty or null
      • 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