All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.walletconnect.foundation.util.jwt.JwtHeader.kt Maven / Gradle / Ivy

There is a newer version: 1.18.4
Show newest version
@file:JvmSynthetic

package com.walletconnect.foundation.util.jwt

import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass


@JsonClass(generateAdapter = true)
class JwtHeader(
    @Json(name = "alg")
    val algorithm: String,
    @Json(name = "typ")
    val type: String,
) {
    @Json(ignore = true)
    val encoded = encodeJSON(this) // encode on init to not encode every time jwt is generated

    companion object {
        val EdDSA = JwtHeader("EdDSA", "JWT")
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy