summaryrefslogtreecommitdiffstats
path: root/ipsilon
diff options
context:
space:
mode:
authorPatrick Uiterwijk <puiterwijk@redhat.com>2015-04-28 19:11:12 +0200
committerPatrick Uiterwijk <puiterwijk@redhat.com>2015-04-28 20:53:06 +0200
commit86f5401c7cb620046b6dd7730844998dec595f43 (patch)
tree60e8eb4602d570341ac7a5cd575b0f55be51e27e /ipsilon
parentba45934659346510966ca6c58a01dbba3eca7d2f (diff)
downloadipsilon.git-86f5401c7cb620046b6dd7730844998dec595f43.tar.gz
ipsilon.git-86f5401c7cb620046b6dd7730844998dec595f43.tar.xz
ipsilon.git-86f5401c7cb620046b6dd7730844998dec595f43.zip
Add OpenID test suite
This tests core OpenID and the Attribute Exchange, Simple Registration and Teams extensions. Using a small wsgi tool because mod_auth_openid does not support all extensions. Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com> Reviewed-by: Rob Crittenden <rcritten@redhat.com>
Diffstat (limited to 'ipsilon')
-rw-r--r--ipsilon/login/authtest.py3
-rw-r--r--ipsilon/providers/openidp.py7
2 files changed, 7 insertions, 3 deletions
diff --git a/ipsilon/login/authtest.py b/ipsilon/login/authtest.py
index 7fc4160..5f0ff6e 100644
--- a/ipsilon/login/authtest.py
+++ b/ipsilon/login/authtest.py
@@ -36,7 +36,8 @@ class TestAuth(LoginFormBase):
'givenname': 'Test User',
'surname': username,
'fullname': 'Test User %s' % username,
- 'email': '%s@example.com' % username
+ 'email': '%s@example.com' % username,
+ '_groups': [username]
}
return self.lm.auth_successful(self.trans,
username, 'password', testdata)
diff --git a/ipsilon/providers/openidp.py b/ipsilon/providers/openidp.py
index 4e47d3e..032c406 100644
--- a/ipsilon/providers/openidp.py
+++ b/ipsilon/providers/openidp.py
@@ -143,6 +143,8 @@ class Installer(ProviderInstaller):
help='Configure OpenID Provider')
group.add_argument('--openid-dburi',
help='OpenID database URI')
+ group.add_argument('--openid-extensions', default='',
+ help='List of OpenID Extensions to enable')
def configure(self, opts):
if opts['openid'] != 'yes':
@@ -160,10 +162,11 @@ class Installer(ProviderInstaller):
po.wipe_data()
po.wipe_config_values()
config = {'endpoint url': url,
- 'identity_url_template': '%sid/%%(username)s' % url,
+ 'identity url template': '%sid/%%(username)s' % url,
'database url': opts['openid_dburi'] or
opts['database_url'] % {
- 'datadir': opts['data_dir'], 'dbname': 'openid'}}
+ 'datadir': opts['data_dir'], 'dbname': 'openid'},
+ 'enabled extensions': opts['openid_extensions']}
po.save_plugin_config(config)
# Update global config to add login plugin