JWT module of PicoRuby

Type aliases

secret_t

MbedTLS::PKey::RSA | String | nil

key_t

MbedTLS::PKey::RSA | String | nil

alg_t

"rs256" | "RS256" | "hs256" | "HS256" | "none" | "NONE"

header_t

Hash[String | Symbol, Object]

payload_t

Hash[String, Object]

Singleton methods

decode

JWT.decode(String token, ?key_t key, ?validate: bool, ?algorithm: alg_t, ?ignore_exp: bool) -> [payload_t, header_t]

encode

JWT.encode(String payload, ?secret_t secret, ?String algorithm, ?header_t headers ) -> String
Tags: