class Athena::Mercure::Authorization

Defined in:

authorization.cr

Constructors

Instance Method Summary

Constructor Detail

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

[View source]

Instance Method Detail

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

[View source]
def 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]
def 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]