Exemplo n.º 1
0
from linotp.lib.config.parsing import ConfigTree
from linotp.lib.config.parsing import ConfigNotRecognized

from linotp.lib.policy import getPolicy, get_client_policy
from linotp.lib.policy import getPolicyActionValue
from linotp.lib.context import request_context

from linotp.lib.registry import ClassRegistry
from linotp.lib.module_loader import import_submodules

log = logging.getLogger(__name__)

# -------------------------------------------------------------------------- --
# establish the global provider module registry

provider_registry = ClassRegistry()

from linotp.lib.config import linotp_config_tree


def load_provider_classes():
    """ iterates through the modules in this package and import every single
    one of them. This will trigger the registration of the providers in
    the global provider_registry (s.o.), which registers all available
    provider classes

    :sideeffect: the classes in the submodules are registrated in the
                 provider registry
    """

    try:
Exemplo n.º 2
0
#    Contact: www.linotp.org
#    Support: www.keyidentity.com
#

import flask

from linotp.lib.registry import ClassRegistry
from linotp.lib.error import TokenTypeNotSupportedError
from os import path, walk
import logging

log = logging.getLogger(__name__)

# ------------------------------------------------------------------------------

tokenclass_registry = ClassRegistry()

# ------------------------------------------------------------------------------


def reload_classes():
    """

    iterates through the modules in this package
    and import every single one of them

    """

    # ---------------------------------------------------------------------- --

    # if there is a list of predefined tokens in the linotp.ini