Class MessageC2SLoginWithToken

java.lang.Object
marauroa.common.net.message.Message
marauroa.common.net.message.MessageC2SLoginWithToken
All Implemented Interfaces:
Serializable

public class MessageC2SLoginWithToken extends Message
This message indicate the server that the client wants to login and send the needed info: username, password and seed to the server. The password is protected by Crypt(xor(xor(client nonce, server nonce), password))
See Also:
Message
  • Constructor Details

    • MessageC2SLoginWithToken

      public MessageC2SLoginWithToken()
      Constructor for allowing creation of an empty message
    • MessageC2SLoginWithToken

      public MessageC2SLoginWithToken(Channel source, byte[] nonce, byte[] encryptedSessionKey, byte[] initVector, String username, String tokenType, byte[] encryptedToken)
      Constructor with a TCP/IP source/destination of the message and the name of the choosen character.
      Parameters:
      source - The TCP/IP address associated to this message
      nonce - random number to prevent replay attacks
      username - the username of the user that wants to login
      initVector -
      encryptedSessionKey -
      tokenType - type of token
      token - authentication token
  • Method Details

    • getNonce

      public byte[] getNonce()
    • getEncryptedSessionKey

      public byte[] getEncryptedSessionKey()
    • getInitVector

      public byte[] getInitVector()
    • getUsername

      public String getUsername()
      This method returns the username
      Returns:
      the username
    • getTokenType

      public String getTokenType()
      This method returns the tokenType
      Returns:
      the tokenType
    • getEncryptedToken

      public byte[] getEncryptedToken()
      This method returns the encoded token
      Returns:
      the token
    • toString

      public String toString()
      This method returns a String that represent the object
      Overrides:
      toString in class Message
      Returns:
      a string representing the object.
    • writeObject

      public void writeObject(OutputSerializer out) throws IOException
      Description copied from class: Message
      Serialize the object into an ObjectOutput
      Specified by:
      writeObject in interface Serializable
      Overrides:
      writeObject in class Message
      Parameters:
      out - the output serializer.
      Throws:
      IOException - if the serializations fails
    • readObject

      public void readObject(InputSerializer in) throws IOException
      Description copied from class: Message
      Serialize the object from an ObjectInput
      Specified by:
      readObject in interface Serializable
      Overrides:
      readObject in class Message
      Parameters:
      in - the input serializer
      Throws:
      IOException - if the serializations fails