module Athena::Mercure::TokenFactory::Interface

Overview

A token factory is responsible for creating the token used to authenticate requests to the Mercure hub.

Direct including types

Defined in:

token_factory/interface.cr

Instance Method Summary

Instance Method Detail

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

Returns a JWT token that has access to subscribe and publish to the provided topics. Optionally, additional_claims may be added to the JWT.


[View source]