module

JWT

Constants

VERSION = "1.7.2"

Instance methods

asn1_to_raw(signature : Bytes, private_key : OpenSSL::PKey::EC) : Bytes

OpenSSL returns signatures encoded as ASN.1 values However the JWT specification requires these to be raw integers

Source
decode(token : String, key : String = "", algorithm : Algorithm = Algorithm::None, verify = true, validate = true, **options) : Tuple
Source
decode(token : String, algorithm : Algorithm | Nil = nil, verify = true, validate = true, **options, &) : Tuple
Source
encode(payload, key : String, algorithm : Algorithm, **header_keys) : String
Source
encode_header(algorithm : Algorithm, **keys) : String
Source
encode_payload(payload) : String
Source
encoded_signature(algorithm : Algorithm, key : String, data : String)
Source
raw_to_asn1(signature : Bytes, public_key : OpenSSL::PKey::EC) : Bytes
Source
sign(algorithm : Algorithm, key : String, data : String)
Source

Nested types