- self._options = {
- 'default email domain': [
- """Default email domain, for users missing email property.""",
- 'string',
- 'example.com'
- ],
- 'endpoint url': [
- """The Absolute URL of the OpenID provider""",
- 'string',
- 'http://localhost:8080/idp/openid/'
- ],
- 'identity url template': [
- """The templated URL where identities are exposed.""",
- 'string',
- 'http://localhost:8080/idp/openid/id/%(username)s'
- ],
- 'trusted roots': [
- """List of trusted relying parties.""",
- 'list',
- []
- ],
- 'untrusted roots': [
- """List of untrusted relying parties.""",
- 'list',
- []
- ],
- 'enabled extensions': [
- """List of enabled extensions""",
- 'list',
- []
- ],
- }
+ self.new_config(
+ self.name,
+ pconfig.String(
+ 'default email domain',
+ 'Used for users missing the email property.',
+ 'example.com'),
+ pconfig.String(
+ 'endpoint url',
+ 'The Absolute URL of the OpenID provider',
+ 'http://localhost:8080/idp/openid/'),
+ pconfig.Template(
+ 'identity url template',
+ 'The templated URL where identities are exposed.',
+ 'http://localhost:8080/idp/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.Condition(
+ 'enabled',
+ 'Whether the OpenID IDP is enabled',
+ False)
+ )