Skip to content

class Athena::Mercure::Authorization
inherits Reference #

Constructors#

.new(hub_registry : AMC::Hub::Registry, cookie_lifetime : Time::Span = 1.hour, cookie_samesite : HTTP::Cookie::SameSite = :strict)#

View source

Methods#

#clear_cookie(request : HTTP::Request, response : HTTP::Server::Response, hub_name : String | Nil = nil) : Nil#

View source

#create_cookie(request : HTTP::Request, subscribe : Array(String) | Nil = [] of String, publish : Array(String) | Nil = [] of String, additional_claims : Hash | Nil = nil, hub_name : String | Nil = nil) : HTTP::Cookie#

View source

#set_cookie(request : HTTP::Request, response : HTTP::Server::Response, subscribe : Array(String) | Nil = [] of String, publish : Array(String) | Nil = [] of String, additional_claims : Hash | Nil = nil, hub_name : String | Nil = nil)#

View source