User

open class User(
    val username: String,
    val password: String
)

val User.json
    get() = Json.encodeToString(this)

Role

@Serializable
class Role(val name: String)

val Role.json
    get() = Json.encodeToString(this)

Token

@Serializable
class Token (
    val token : String
){
    val authHeader
        get() = "Bearer $token"
}}