java.lang.Object
com.github.jh3nd3rs0n.jargyle.protocolbase.socks5.gssapimethod.AuthenticationMessage

public final class AuthenticationMessage extends Object
A message sent by the client or the server during the authentication process.
  • Field Details

    • MESSAGE_TYPE_BYTE_VALUE

      public static final byte MESSAGE_TYPE_BYTE_VALUE
      The byte value associated with this type of message.
      See Also:
    • MESSAGE_TYPE

      public static final UnsignedByte MESSAGE_TYPE
      The UnsignedByte associated with this type of message.
  • Method Details

    • newInstance

      public static AuthenticationMessage newInstance(Token tkn)
      Returns a new AuthenticationMessage with the provided Token.
      Parameters:
      tkn - the provided Token
      Returns:
      a new AuthenticationMessage with the provided Token
    • newInstanceFromClient

      public static AuthenticationMessage newInstanceFromClient(InputStream in) throws IOException
      Returns a new AuthenticationMessage from the provided InputStream from the client. An EOFException is thrown if the end of the provided InputStream is reached.
      Parameters:
      in - the provided InputStream from the client
      Returns:
      a new AuthenticationMessage
      Throws:
      IOException - if the end of the provided InputStream is reached (EOFException) or if an I/O error occurs
    • newInstanceFromServer

      public static AuthenticationMessage newInstanceFromServer(InputStream in) throws IOException
      Returns a new AuthenticationMessage from the provided InputStream from the server. An AbortMessageException is thrown if an AbortMessage is received. An EOFException is thrown if the end of the provided InputStream is reached.
      Parameters:
      in - the provided InputStream from the server
      Returns:
      a new AuthenticationMessage
      Throws:
      IOException - if an AbortMessage is received (AbortMessageException), if the end of the provided InputStream is reached (EOFException), or if an I/O error occurs
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getMessageType

      public UnsignedByte getMessageType()
      Returns the UnsignedByte associated with this type of message.
      Returns:
      the UnsignedByte associated with this type of message
    • getToken

      public Token getToken()
      Returns the Token of this AuthenticationMessage.
      Returns:
      the Token of this AuthenticationMessage
    • getVersion

      public Version getVersion()
      Returns the Version of this AuthenticationMessage.
      Returns:
      the Version of this AuthenticationMessage
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toByteArray

      public byte[] toByteArray()
      Returns the byte array of this AuthenticationMessage.
      Returns:
      the byte array of this AuthenticationMessage
    • toString

      public String toString()
      Returns the String representation of this AuthenticationMessage.
      Overrides:
      toString in class Object
      Returns:
      the String representation of this AuthenticationMessage