Skip to content

Commit

Permalink
Update startup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
bhumin-fw authored Mar 8, 2024
1 parent 35bfc73 commit 52d46e4
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions forms-flow-api-utils/src/formsflow_api_utils/utils/startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,9 @@ def setup_jwt_manager(app, jwt_manager):
"""Use flask app to configure the JWTManager to work for a particular Realm."""

def get_roles(a_dict):
print("Remove after testing")
print(app.config["JWT_OIDC_AUDIENCE"])
for k, v in a_dict.items():
print(k, v)
resource = a_dict["resource_access"].get(app.config["JWT_OIDC_AUDIENCE"])
return resource["roles"] if resource else a_dict["roles"]
print("setup_jwt_manager Called")
app.config["JWT_ROLE_CALLBACK"] = get_roles
print(app.config["JWT_ROLE_CALLBACK"])
jwt_manager.init_app(app)


Expand Down

0 comments on commit 52d46e4

Please sign in to comment.