module CrystalGauntlet::Accounts

Extended Modules

Defined in:

lib/accounts.cr

Constant Summary

AUTH_CACHE = Hash(Tuple(String | Nil, String | Nil, String | Nil), Tuple(Int32, Int32) | Tuple(Nil, Nil)).new

todo: clean this periodically

SESSIONS = Hash(Tuple(String | Nil, String | Nil), Tuple(Int32, Int32, Int64)).new

Instance Method Summary

Instance Method Detail

def are_friends(account_id_1 : Int32, account_id_2 : Int32) #

[View source]
def auth(params : URI::Params) : Tuple(Int32, Int32) | Tuple(Nil, Nil) #

returns userid, accountid


[View source]
def auth_old(req : HTTP::Request, params : URI::Params) : Tuple(Int32, Int32) | Tuple(Nil, Nil) #

[View source]
def get_account_id_from_params(params : URI::Params) : Int32 | Nil #

DOESN'T VERIFY PASSWORD


[View source]
def get_ext_id_from_params(params : URI::Params) : Int32 | Nil #

DOESN'T VERIFY PASSWORD


[View source]
def get_user_id(ext_id : Int32) : Int32 #

[View source]
def is_blocked_by(account_id : Int32, by : Int32) #

[View source]
def new_session(req : HTTP::Request, username : String, password : String) : Bool #

[View source]
def verify_gjp(account_id : Int32, gjp : String) : Bool #

[View source]