secret

fun secret(secret: String, algorithm: String = "HS256"): JwtKeySource

Verifies tokens using an HMAC secret string.

algorithm defaults to "HS256"; pass "HS384" or "HS512" when needed. The secret is encoded as UTF-8 bytes; for binary secrets use secretBytes.