Skip to content

struct Athena::Mercure::TokenProvider::Factory
inherits Struct #

A token provider implementation that provides the JWT via an AMC::TokenFactory::Interface instance. The JWT is allowed the provided grants, and includes the provided additional_claims.

Included modules

Athena::Mercure::TokenProvider::Interface

Constructors#

.new(factory : AMC::TokenFactory::Interface, grants : Array(AMC::Grant) = [] of AMC::Grant, additional_claims : Hash(String, String | Array(String)) = {} of String => String | Array(String))#

View source

Methods#

#jwt : String#

Returns the JWT token used to authenticate requests to the Mercure hub.

View source