Merge "oidc: fix OpenID Connect scope option"

This commit is contained in:
Jenkins 2016-06-27 17:55:25 +00:00 committed by Gerrit Code Review
commit bebe214534
2 changed files with 3 additions and 0 deletions

View File

@ -111,6 +111,7 @@ class OpenIDConnectPassword(_OpenIDConnectBase):
loading.Opt('username', help='Username'),
loading.Opt('password', secret=True, help='Password'),
loading.Opt('openid-scope', default="profile",
dest='scope',
help='OpenID Connect scope that is requested from OP')
])

View File

@ -150,6 +150,8 @@ class OpenIDConnectPasswordTests(OpenIDConnectBaseTests, utils.TestCase):
set(['username', 'password', 'openid-scope']).issubset(
set([o.name for o in options]))
)
# openid-scope gets renamed into "scope"
self.assertIn('scope', [o.dest for o in options])
def test_basic(self):
access_token_endpoint = uuid.uuid4().hex