module Garden::Auth

Extended Modules

Defined in:

auth.cr

Constant Summary

ALG = JWT::Algorithm::HS256
LEEWAY = 10.minutes
TIMEOUT = 1.day
TOKEN = ENV["SOLHTTP_SECRET"]

Instance Method Summary

Instance Method Detail

def auth_user(ctx : HTTP::Server::Context) : DB::User | Nil #

[View source]
def auth_user_id(ctx : HTTP::Server::Context) : String | Nil #

[View source]
def check_token(ctx : HTTP::Server::Context, user_id : String) : Bool #

[View source]
def mint_token(user : DB::User) #

[View source]