Module Import alias Import alias Import alias Import alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad FunctionDef arguments args NameParam defaults body Expr Str If CompareNotEq AttributeLoad NameLoad attr Str body Assign NameStore Call NameLoad Str keyword Num Assign SubscriptStore NameLoad Index Str Str Return NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assert CompareIn Str NameLoad Assert CompareIn Str NameLoad handlers ExceptHandler type NameLoad body Return Call NameLoad Str ExceptHandler type NameLoad name NameStore body Return Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str SubscriptLoad NameLoad Index Str If CompareIs NameLoad NameLoad body Return Call NameLoad keyword Num orelse Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr If CompareEq SubscriptLoad NameLoad Index Str NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Assign NameStore Call NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str SubscriptLoad NameLoad Index Str Return NameLoad orelse Expr Call AttributeLoad NameLoad attr BinOpMod Str SubscriptLoad NameLoad Index Str Return Call NameLoad keyword Num decorator_list NameLoad
N/A N/A json N/A hashlib N/A logging N/A os django.http HttpResponse HttpResponseBadRequest django.views.decorators.csrf csrf_exempt django.conf settings api.models db_model N/A logger N/A N/A logging getLogger __name__ login N/A N/A request N/A N/A N/A 
    Authenticates given 'username' and 'password_hash' against user in database.
     N/A N/A N/A request method POST N/A N/A r N/A HttpResponse Invalid method. Only POST method accepted. status 405 N/A N/A r N/A Allow POST N/A r N/A N/A N/A in_json N/A N/A json loads N/A request body N/A N/A username in_json N/A N/A password in_json N/A N/A N/A AssertionError N/A N/A N/A HttpResponseBadRequest argument mismatch N/A N/A ValueError N/A e N/A N/A N/A HttpResponseBadRequest invalid JSON N/A dbc N/A N/A db_model connect N/A user N/A N/A N/A dbc hbuser find_one N/A username N/A in_json N/A username N/A N/A user None N/A N/A N/A HttpResponse status 401 N/A N/A m N/A N/A hashlib sha512 N/A N/A N/A m update N/A in_json N/A password N/A password_hash N/A N/A m hexdigest N/A N/A N/A user N/A password password_hash N/A N/A m N/A N/A hashlib sha512 N/A N/A N/A m update N/A N/A os urandom 64 N/A token_string N/A N/A m hexdigest api.models redis_wrapper N/A r N/A N/A redis_wrapper init_redis N/A N/A N/A r set token_string N/A user N/A username N/A settings TOKEN_TTL N/A r N/A HttpResponse N/A N/A r N/A X-Auth-Token token_string N/A N/A N/A logger info N/A login success for user '%s' N/A in_json N/A username N/A r N/A N/A N/A N/A logger info N/A login failed for user '%s' N/A in_json N/A username N/A N/A HttpResponse status 401 N/A csrf_exempt