expose the user info url as a configuration

Change-Id: Ia19c00b04a380fe862b7a67061d9ece2b34ad1ab
This commit is contained in:
Eyal 2018-08-02 15:57:41 +03:00
parent 4625c85aca
commit 2c644bdb05
2 changed files with 7 additions and 2 deletions

View File

@ -68,7 +68,7 @@ class KeycloakAuthHandler(auth.AuthHandler):
# to use user info endpoint which also takes exactly one parameter
# (access token) and replies with error if token is invalid.
user_info_endpoint = (
"%s/realms/%s/protocol/openid-connect/userinfo" %
("%s" + CONF.keycloak_oidc.user_info_endpoint_url) %
(CONF.keycloak_oidc.auth_url, realm_name)
)

View File

@ -455,7 +455,12 @@ keycloak_oidc_opts = [
'insecure',
default=False,
help=_('If True, SSL/TLS certificate verification is disabled')
)
),
cfg.StrOpt(
'user_info_endpoint_url',
default='/realms/%s/protocol/openid-connect/userinfo',
help='Endpoint against which authorization will be performed'
),
]
openstack_actions_opts = [