Token

@Serializable
data class Token(val token: String? = null, val key: ByteArray? = null, val validUntil: Long, val rights: Int, val unsecurePassword: Boolean) : LoxoneMsgVal

Represents Loxone authentication token.

Constructors

Link copied to clipboard
constructor(token: String? = null, key: ByteArray? = null, validUntil: Long, rights: Int, unsecurePassword: Boolean)

Properties

Link copied to clipboard
Link copied to clipboard
@Serializable(with = HexSerializer::class)
val key: ByteArray? = null

The token key value. May be null in case of response to refresh token or authwithtoken.

Link copied to clipboard
@SerialName(value = "tokenRights")
val rights: Int
Link copied to clipboard
val token: String? = null

The actual token value. May be null in case of response to refresh token or authwithtoken

Link copied to clipboard
@SerialName(value = "unsecurePass")
val unsecurePassword: Boolean
Link copied to clipboard

Seconds since loxone epoch (1.1.2009) to which the token is valid.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun merge(other: Token): Token

Merges the given token to this one and returns the merged token. The Token.token and Token.key are taken from given token only if they are not null, otherwise the values from this token are used. Other properties are always taken from given token.

Link copied to clipboard

Seconds remaining to token expiry.