struct

Athena::Mercure::TokenFactory::JWT

Inherits Athena::Mercure::TokenFactory::Interface < Struct < Value < Object

A token factory implementation based on the Crystal JWT shard.

Constructors

new(jwt_secret : String, algorithm : ::JWT::Algorithm = :hs256, jwt_lifetime : Int32 | Time::Span | Nil = 3600, passphrase : String = "")
Source

Instance methods

create(subscribe : Array(String) | Nil = [] of String, publish : Array(String) | Nil = [] of String, additional_claims : Hash | Nil = nil) : String

:inherit:

Source