Skip to content
This repository was archived by the owner on May 15, 2023. It is now read-only.

Allow provider IDs without audiences #39

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions endpoints_management/control/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,12 @@ def _extract_auth_config(self):
provider_ids_to_audiences = {}
for requirement in auth_rule.requirements:
provider_id = requirement.providerId
if provider_id and requirement.audiences:
audiences = requirement.audiences.split(u",")
provider_ids_to_audiences[provider_id] = audiences
if provider_id:
if requirement.audiences:
audiences = requirement.audiences.split(u",")
provider_ids_to_audiences[provider_id] = audiences
else:
provider_ids_to_audiences[provider_id] = None
auth_infos[selector] = AuthInfo(provider_ids_to_audiences)
return auth_infos

Expand Down