Class Login
java.lang.Object
de.justofplay.xled.Login
Represents the login/session information for a Twinkly device.
Parses the authentication token and status from a JSON response.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the authentication token for API requests.Gets the expiration time (in seconds) for the authentication token.Gets the challenge-response string returned by the device.Gets the status code returned by the device.Gets the status message mapped from the status code.
-
Constructor Details
-
Login
Constructs a Login object from a JSON string.- Parameters:
jsonString
- The JSON string containing login/session information.
-
-
Method Details
-
getAuthenticationToken
Gets the authentication token for API requests.- Returns:
- The authentication token string.
-
getAuthenticationTokenExpiresIn
Gets the expiration time (in seconds) for the authentication token.- Returns:
- The expiration time as a string.
-
getChallengeResponse
Gets the challenge-response string returned by the device.- Returns:
- The challenge-response string.
-
getStatusCode
Gets the status code returned by the device.- Returns:
- The status code as a string.
-
getStatusMessage
Gets the status message mapped from the status code.- Returns:
- The status message as a string.
-