Skip to content

Commit

Permalink
fix: added password policy scope to auth
Browse files Browse the repository at this point in the history
  • Loading branch information
Tbaile committed Feb 23, 2024
1 parent 80b78f0 commit cd37628
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions imageroot/api-moduled/handlers/login/post
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ oclaims = {
if proc_whoami.returncode == 49 and "Password expired" in proc_whoami.stderr:
# Password must be changed immediately: return a token limited to
# password changing:
oclaims["scope"] = ["change-password"]
oclaims["scope"] = ["change-password", "get-password-policy"]
elif proc_whoami.returncode != 0:
sys.exit(3) # Login failed
elif "domain admins" not in oclaims["groups"]:
oclaims["scope"] = ["change-password"]
oclaims["scope"] = ["change-password", "get-password-policy"]

json.dump(oclaims, fp=sys.stdout)

0 comments on commit cd37628

Please sign in to comment.