Class AbstractSAMLArtifact

    • Field Detail

      • log

        @Nonnull
        private final org.slf4j.Logger log
        Class logger.
      • typeCode

        private byte[] typeCode
        2 byte artifact type code.
    • Constructor Detail

      • AbstractSAMLArtifact

        protected AbstractSAMLArtifact​(@Nonnull
                                       byte[] code)
        Constructor.
        Parameters:
        code - the artifact type code
        Throws:
        IllegalArgumentException - thrown if the given type code is not two bytes in length
    • Method Detail

      • getArtifactBytes

        @Nonnull
        public byte[] getArtifactBytes()
        Gets the bytes for the artifact.
        Specified by:
        getArtifactBytes in interface SAMLArtifact
        Returns:
        the bytes for the artifact
      • getTypeCode

        @Nonnull
        public byte[] getTypeCode()
        Gets the 2 byte type code for this artifact.
        Specified by:
        getTypeCode in interface SAMLArtifact
        Returns:
        the type code for this artifact
      • setTypeCode

        protected void setTypeCode​(@Nonnull
                                   byte[] newTypeCode)
        Sets the 2 byte type code for this artifact.
        Parameters:
        newTypeCode - 2 byte type code for this artifact
      • getRemainingArtifact

        @Nonnull
        public abstract byte[] getRemainingArtifact()
        Gets the artifact bytes minus the type code.
        Returns:
        artifact bytes minus the type code
      • base64Encode

        @Nonnull
        @NotEmpty
        public String base64Encode()
                            throws net.shibboleth.utilities.java.support.codec.EncodingException
        Gets the Base64 encoded artifact.
        Returns:
        Base64 encoded artifact.
        Throws:
        net.shibboleth.utilities.java.support.codec.EncodingException - if the artifact could not be base64 encoded.
      • hexEncode

        @Nonnull
        @NotEmpty
        public String hexEncode()
        Gets the hex encoded artifact.
        Returns:
        hex encoded artifact
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object