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.

Warning

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

/auth_dev/login

Page providing special developer login form.

  • Authentication: no authentication

  • Methods: GET, POST

class hawat.blueprints.auth_dev.RegisterView[source]

Bases: vial.blueprints.auth_dev.RegisterView

View responsible for registering new user account into application.

static get_item_form(item)[source]

Hook method. Must return instance of flask_wtf.FlaskForm appropriate for given item class.

hawat.blueprints.auth_dev.get_blueprint()[source]

Mandatory interface for vial.Vial and factory function. This function must return a valid instance of vial.app.VialBlueprint or flask.Blueprint.