def _perform_auth(cls, protocol_id):
idps = PROVIDERS.federation_api.list_idps()
for idp in idps:
try: remote_id_name = federation_utils.get_remote_id_parameter( idp, protocol_id)
except exception.FederatedProtocolNotFound:
# no protocol for this IdP, so this can't be the IdP we're
# looking for continue # zhufl: if no remote_id_name is found, we'll get # "NameError: name 'remote_id' is not defined" exception # in the next line when we first use remote_id before definition. remote_id = flask.request.environ.get(remote_id_name)
if remote_id: break
if not remote_id:
msg = 'Missing entity ID from environment'
tr_msg = _('Missing entity ID from environment') LOG.error(msg)
raise exception.Unauthorized(tr_msg)
def _perform_auth(cls, protocol_id): federation_ api.list_ idps()
remote_ id_name = federation_ utils.get_ remote_ id_parameter(
idp, protocol_id) FederatedProtoc olNotFound:
continue # zhufl: if no remote_id_name is found, we'll get
# "NameError: name 'remote_id' is not defined" exception
# in the next line when we first use remote_id before definition.
remote_ id = flask.request. environ. get(remote_ id_name)
break
LOG. error(msg) Unauthorized( tr_msg)
idps = PROVIDERS.
for idp in idps:
try:
except exception.
# no protocol for this IdP, so this can't be the IdP we're
# looking for
if remote_id:
if not remote_id:
msg = 'Missing entity ID from environment'
tr_msg = _('Missing entity ID from environment')
raise exception.