Beispiel #1
0
    def __init__(self, *pargs):
        super(IdpProvider, self).__init__('openid', 'OpenID', 'openid', *pargs)
        self.mapping = InfoMapping()
        self.page = None
        self.datastore = None
        self.server = None
        self.basepath = None
        self.extensions = LoadExtensions()
        self.description = """
Provides OpenID 2.0 authentication infrastructure. """

        self.new_config(
            self.name,
            pconfig.String('database url',
                           'Database URL for OpenID temp storage',
                           'openid.sqlite'),
            pconfig.String(
                'default email domain',
                'Used for users missing the email property.' +
                ' (Leave empty to disable)', ''),
            pconfig.String('endpoint url',
                           'The Absolute URL of the OpenID provider',
                           'http://localhost:8080/openid/'),
            pconfig.Template(
                'identity url template',
                'The templated URL where identities are exposed.',
                'http://localhost:8080/openid/id/%(username)s'),
            pconfig.List('trusted roots', 'List of trusted relying parties.'),
            pconfig.List('untrusted roots',
                         'List of untrusted relying parties.'),
            pconfig.Choice('enabled extensions',
                           'Choose the extensions to enable',
                           self.extensions.available().keys()),
            pconfig.MappingList(
                'default attribute mapping',
                'Defines how to map attributes before calling extensions',
                [['*', '*']]),
            pconfig.ComplexList(
                'default allowed attributes',
                'Defines a list of allowed attributes, applied after mapping',
                ['*']),
        )