Skip to content

Commit

Permalink
Honor audience parameter in authz request.
Browse files Browse the repository at this point in the history
Stop supporting python 3.7
  • Loading branch information
rohe committed May 24, 2024
1 parent 1e46534 commit 56c0c73
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ classifiers =[
[options]
package_dir = "src"
packages = "find:"
python= "^3.6"
python= "^3.8"

[tool.black]
line-length = 100
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ def run_tests(self):
classifiers=[
"Development Status :: 4 - Beta",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down
5 changes: 5 additions & 0 deletions src/idpyoidc/server/session/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,11 @@ def create_grant(
resources = []
if "resource" in auth_req:
resources = auth_req["resource"]
if "audience" in auth_req:
if isinstance(auth_req["audience"], str):
resources.append(auth_req["audience"])
else:
resources.extend(auth_req["audience"])

return self.add_grant(
path=self.make_path(user_id=user_id, client_id=client_id),
Expand Down

0 comments on commit 56c0c73

Please sign in to comment.