Skip to content
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
6 changes: 3 additions & 3 deletions microservices/gatewayApi/clients/uma/resourceset.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def map_res_name_to_id (pat_token, name):

log = app.logger

tokenUrl = "%srealms/%s/authz/protection/resource_set?exactName=true&name=%s" % (conf['serverUrl'],conf['realm'], name)
tokenUrl = "%srealms/%s/authz/protection/resource_set?name=%s&deep=true" % (conf['serverUrl'],conf['realm'], name)

headers = {
"Authorization": "Bearer %s" % pat_token,
Expand All @@ -111,7 +111,7 @@ def map_res_name_to_id (pat_token, name):
log.debug("[map_res_name_to_id] %s" % r.status_code)
json = r.json()
log.debug("[map_res_name_to_id] %s" % json)
if len(json) == 0:
if len(json) == 0 or name != json[0]['name']:
return None
else:
return json[0]
return json[0]['_id']