oidc: fix OpenID Connect scope option
There is a missmatch between the option being defined in the OpenIDConnectPassword loader and the OidcPassword class. The loader defines it as "openid-scope" but the OidcPassword constructor only accepts "scope". Closes-Bug: 1594272 Change-Id: I7dbaaa4eb52c900bcd19da4c274bd35dc8b98c6f
This commit is contained in:
parent
aa01e5fe38
commit
bd18bc3d0d
|
@ -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')
|
||||
])
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue