API
***

The external (json/form) API is described here


Core
====

flask_security.current_user

   A proxy for the current user.

flask_security.Security.unauthorized_handler()

   If an endpoint fails authentication or authorization from one of
   the decorators described below (except "login_required"), a method
   annotated with this decorator will be called. For "login_required"
   (which is implemented in Flask-Login) use
   **flask_security.login_manager.unauthorized_handler**

   Deprecated since version 3.3.0.


Protecting Views
================


User Object Helpers
===================


Datastores
==========


Utils
=====


Signals
=======

See the Flask documentation on signals for information on how to use
these signals in your code.

Tip:

  Remember to add "**extra_args" to your signature so that if we add
  additional parameters in the future your code doesn't break.

See the documentation for the signals provided by the Flask-Login and
Flask-Principal extensions. In addition to those signals, Flask-
Security sends the following signals.

user_authenticated

   Sent when a user successfully authenticates. In addition to the app
   (which is the sender), it is passed *user*, and *authn_via*
   arguments. The *authn_via* argument specifies how the user
   authenticated - it will be a list with possible values of
   "password", "sms", "authenticator", "email", "confirm", "reset",
   "register".

   New in version 3.4.0.

user_registered

   Sent when a user registers on the site. In addition to the app
   (which is the sender), it is passed *user*, *confirm_token* and
   *form_data* arguments. *form_data* is a dictionary representation
   of registration form's content received with registration request.

user_confirmed

   Sent when a user is confirmed. In addition to the app (which is the
   sender), it is passed a *user* argument.

confirm_instructions_sent

   Sent when a user requests confirmation instructions. In addition to
   the app (which is the sender), it is passed a *user* argument.

login_instructions_sent

   Sent when passwordless login is used and user logs in. In addition
   to the app (which is the sender), it is passed *user* and
   *login_token* arguments.

password_reset

   Sent when a user completes a password reset. In addition to the app
   (which is the sender), it is passed a *user* argument.

password_changed

   Sent when a user completes a password change. In addition to the
   app (which is the sender), it is passed a *user* argument.

reset_password_instructions_sent

   Sent when a user requests a password reset. In addition to the app
   (which is the sender), it is passed *user* and *token* arguments.

tf_code_confirmed

   Sent when a user performs two-factor authentication login on the
   site. In addition to the app (which is the sender), it is passed
   *user* and *method* arguments.

   New in version 3.3.0.

tf_profile_changed

   Sent when two-factor is used and user logs in. In addition to the
   app (which is the sender), it is passed *user* and *method*
   arguments.

   New in version 3.3.0.

tf_disabled

   Sent when two-factor is disabled. In addition to the app (which is
   the sender), it is passed *user* argument.

   New in version 3.3.0.

tf_security_token_sent

   Sent when a two factor security/access code is sent. In addition to
   the app (which is the sender), it is passed *user*, *method*, and
   *token* arguments.

   New in version 3.3.0.

us_security_token_sent

   Sent when a unified sign in access code is sent. In addition to the
   app (which is the sender), it is passed *user*, *method*, *token*,
   *phone_number*, and *send_magic_link* arguments.

   New in version 3.4.0.

us_profile_changed

   Sent when user completes changing their unified sign in profile. In
   addition to the app (which is the sender), it is passed *user* and
   *method* arguments.

   New in version 3.4.0.
