Exemplo n.º 1
0
    def __init__(self):
        log.info("Identity visit plugin initialized")
        get = turbogears.config.get

        self.provider = create_default_provider()

        # When retrieving identity information from the form, use the following
        # form field names. These fields will be removed from the post data to
        # prevent the controller from receiving unexpected fields.
        self.user_name_field = get('identity.form.user_name', 'user_name')
        self.password_field = get('identity.form.password', 'password')
        self.submit_button_name = get('identity.form.submit', 'login')

        # Sources for identity information and the order in which they should be
        # checked. These terms are mapped to methods by prepending
        # "identity_from_".
        sources = get('identity.source', 'form,http_auth,visit').split(',')
        self.identity_sources = list()
        for s in sources:
            try:
                source_method = getattr(self, 'identity_from_' + s)
            except AttributeError:
                raise IdentityConfigurationException(
                    "Invalid identity source: %s" % s)
            self.identity_sources.append(source_method)
Exemplo n.º 2
0
    def __init__(self):
        log.info("Identity visit plugin initialized")
        get = turbogears.config.get

        self.provider = create_default_provider()

        # When retrieving identity information from the form, use the following
        # form field names. These fields will be removed from the post data to
        # prevent the controller from receiving unexpected fields.
        self.user_name_field = get('identity.form.user_name', 'user_name')
        self.password_field = get('identity.form.password', 'password')
        self.submit_button_name = get('identity.form.submit', 'login')

        # Sources for identity information and the order in which they should be
        # checked. These terms are mapped to methods by prepending
        # "identity_from_".
        sources = get('identity.source', 'form,http_auth,visit').split(',')
        self.identity_sources = list()
        for s in sources:
            try:
                source_method = getattr(self, 'identity_from_' + s)
            except AttributeError:
                raise IdentityConfigurationException(
                    "Invalid identity source: %s" % s)
            self.identity_sources.append(source_method)
Exemplo n.º 3
0
def create_extension_model():
    provider = create_default_provider()
    provider.create_provider_model()
Exemplo n.º 4
0
def create_extension_model():
    provider = create_default_provider()
    provider.create_provider_model()
Exemplo n.º 5
0
def create_extension_model():
    """Create the identity provider object."""
    provider = create_default_provider()
    provider.create_provider_model()