hawat.blueprints.auth_dev package


This Hawat pluggable module provides special authentication method, that is particularly usable for developers and enables them to impersonate any user.

After enabling this module special authentication endpoint will be available and will provide simple authentication form with list of all currently available user accounts. It will be possible for that user to log in as any other user without entering password.

This module is disabled by default in production environment and enabled by default in development environment.


This module must never ever be enabled on production systems, because it is a huge security risk and enables possible access control management violation. You have been warned!

Provided endpoints


Page providing special developer login form.

  • Authentication: no authentication

  • Methods: GET, POST

hawat.blueprints.auth_dev.BLUEPRINT_NAME = 'auth_dev'

Name of the blueprint as module global constant.

class hawat.blueprints.auth_dev.DevAuthBlueprint(name, import_name, **kwargs)[source]

Bases: hawat.base.HawatBlueprint

Hawat pluggable module - special developer authentication (auth_dev).

classmethod get_module_title()[source]

Implementation of hawat.base.HawatBlueprint.get_module_title().


Callback method. Will be called from hawat.base.HawatApp.register_blueprint() method and can be used to customize the Flask application object. Possible use cases:

  • application menu customization


app (hawat.base.HawatApp) – Flask application to be customize.

class hawat.blueprints.auth_dev.LoginView[source]

Bases: hawat.base.HTMLMixin, hawat.base.SQLAlchemyMixin, hawat.base.SimpleView

View enabling special developer login.


Implementation of hawat.base.SQLAlchemyMixin.dbmodel().


Mandatory interface required by the flask.views.View.dispatch_request(). Will be called by the Flask framework to service the request.

classmethod get_view_icon()[source]

Implementation of hawat.base.BaseView.get_view_icon().

classmethod get_view_name()[source]

Implementation of hawat.base.BaseView.get_view_name().

classmethod get_view_title(**kwargs)[source]

Implementation of hawat.base.BaseView.get_menu_title().

methods = ['GET', 'POST']

Mandatory interface and factory function. This function must return a valid instance of hawat.base.HawatBlueprint or flask.Blueprint.