Skip to content

Commit

Permalink
chore(oauth): variable renamed to flow
Browse files Browse the repository at this point in the history
  • Loading branch information
thekaveman committed Aug 7, 2024
1 parent 1a57e4a commit bef4401
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions benefits/oauth/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,23 +128,23 @@ def authorize(request):
id_token = token["id_token"]

# We store the returned claim in case it can be used later in eligibility verification.
verifier_claim = flow.claims_provider.claim
flow_claim = flow.claims_provider.claim
stored_claim = None

error_claim = None

if verifier_claim:
if flow_claim:
userinfo = token.get("userinfo")

if userinfo:
claim_value = userinfo.get(verifier_claim)
claim_value = userinfo.get(flow_claim)
# the claim comes back in userinfo like { "claim": "1" | "0" }
claim_value = int(claim_value) if claim_value else None
if claim_value is None:
logger.warning(f"userinfo did not contain: {verifier_claim}")
logger.warning(f"userinfo did not contain: {flow_claim}")
elif claim_value == 1:
# if userinfo contains our claim and the flag is 1 (true), store the *claim*
stored_claim = verifier_claim
stored_claim = flow_claim
elif claim_value >= 10:
error_claim = claim_value

Expand Down

0 comments on commit bef4401

Please sign in to comment.