hawat.blueprints.auth_api package

Description

This pluggable module provides default authentication service for API endpoints.

class hawat.blueprints.auth_api.AuthBlueprint(name, import_name, **kwargs)[source]

Bases: hawat.base.HawatBlueprint

Hawat pluggable module - environment based authentication.

classmethod get_module_title()[source]

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

register_app(app)[source]

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

Parameters

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

hawat.blueprints.auth_api.BLUEPRINT_NAME = 'auth_api'

Name of the blueprint as module global constant.

class hawat.blueprints.auth_api.DeleteKeyView[source]

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

View for deleting existing user accounts.

authentication = True
authorization = [<Permission needs={Need(method='role', value='admin')} excludes=set()>]
classmethod change_item(item)[source]

Interface implementation of hawat.base.ItemChangeView.change_item().

dbmodel

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

classmethod get_menu_icon()[source]

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

classmethod get_menu_title(item=None)[source]

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

static get_message_cancel(**kwargs)[source]

Implementation of hawat.base.ItemActionView.get_message_cancel().

static get_message_failure(**kwargs)[source]

Implementation of hawat.base.ItemActionView.get_message_failure().

static get_message_success(**kwargs)[source]

Implementation of hawat.base.ItemActionView.get_message_success().

classmethod get_view_name()[source]

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

classmethod get_view_template()[source]

Implementation of hawat.base.RenderableView.get_view_template().

methods = ['GET', 'POST']
class hawat.blueprints.auth_api.GenerateKeyView[source]

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

View for generating API keys for user accounts.

authentication = True
authorization = [<Permission needs={Need(method='role', value='admin')} excludes=set()>]
classmethod change_item(item)[source]

Interface implementation of hawat.base.ItemChangeView.change_item().

dbmodel

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

classmethod get_menu_icon()[source]

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

classmethod get_menu_title(item=None)[source]

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

static get_message_cancel(**kwargs)[source]

Implementation of hawat.base.ItemActionView.get_message_cancel().

static get_message_failure(**kwargs)[source]

Implementation of hawat.base.ItemActionView.get_message_failure().

static get_message_success(**kwargs)[source]

Implementation of hawat.base.ItemActionView.get_message_success().

classmethod get_view_name()[source]

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

classmethod get_view_template()[source]

Implementation of hawat.base.RenderableView.get_view_template().

methods = ['GET', 'POST']
hawat.blueprints.auth_api.get_blueprint()[source]

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