Skip to content

Commit

Permalink
Method for optional enforcement of resource attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterBolha committed Oct 11, 2023
1 parent 869068c commit 4760e56
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/idpyoidc/server/oauth2/authorization.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,11 @@ def validate_resource_indicators_policy(request, context, **kwargs):
request["scope"] = scopes
return request

def optional_validate_resource_indicators_policy(request, context, **kwargs):
if "resource" not in request:
return request

return validate_resource_indicators_policy(request, context, **kwargs)

class Authorization(Endpoint):
request_cls = oauth2.AuthorizationRequest
Expand Down

0 comments on commit 4760e56

Please sign in to comment.