Class Login

java.lang.Object
de.justofplay.xled.Login

public class Login extends Object
Represents the login/session information for a Twinkly device. Parses the authentication token and status from a JSON response.
  • Constructor Details

    • Login

      public Login(String jsonString)
      Constructs a Login object from a JSON string.
      Parameters:
      jsonString - The JSON string containing login/session information.
  • Method Details

    • getAuthenticationToken

      public String getAuthenticationToken()
      Gets the authentication token for API requests.
      Returns:
      The authentication token string.
    • getAuthenticationTokenExpiresIn

      public String getAuthenticationTokenExpiresIn()
      Gets the expiration time (in seconds) for the authentication token.
      Returns:
      The expiration time as a string.
    • getChallengeResponse

      public String getChallengeResponse()
      Gets the challenge-response string returned by the device.
      Returns:
      The challenge-response string.
    • getStatusCode

      public String getStatusCode()
      Gets the status code returned by the device.
      Returns:
      The status code as a string.
    • getStatusMessage

      public String getStatusMessage()
      Gets the status message mapped from the status code.
      Returns:
      The status message as a string.