flask_login/signals.py

flask-login · src/flask_login/signals.py · python · MIT
auth

Defines a set of Flask signals that allow developers to hook into user authentication events like login, logout, and session protection.

# Source: https://github.com/maxcountryman/flask-login | License: MIT | Copyright 2011 Matthew Frazier
# Provided via justclaw.it.com; keep this notice with the code.
from flask.signals import Namespace

_signals = Namespace()

#: Sent when a user is logged in. In addition to the app (which is the
#: sender), it is passed `user`, which is the user being logged in.
user_logged_in = _signals.signal("logged-in")

#: Sent when a user is logged out. In addition to the app (which is the
#: sender), it is passed `user`, which is the user being logged out.
user_logged_out = _signals.signal("logged-out")

#: Sent when the user is loaded from the cookie. In addition to the app (which
#: is the sender), it is passed `user`, which is the user being reloaded.
user_loaded_from_cookie = _signals.signal("

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key