Skip to content

Commit

Permalink
Merge pull request #71 from indigo-dc/fix-63
Browse files Browse the repository at this point in the history
handle non-conforming entitlements in entitlement claim
  • Loading branch information
dianagudu authored Aug 19, 2022
2 parents 1169320 + ae001b8 commit 553d55b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion flaat/access_tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class AccessTokenInfo:
""" Infos about the verification of the JWT.
If set to `None`, then the JWT data is unverified."""

def __init__(self, complete_decode, verification=Optional[dict]):
def __init__(self, complete_decode, verification):
self.header = complete_decode.get("header", {})
self.body = complete_decode.get("payload", {})
self.signature = _base64_url_encode(complete_decode.get("signature", b""))
Expand Down
2 changes: 1 addition & 1 deletion flaat/requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def _parse(self, raw: str):
def _matches(
self, required: aarc_entitlement.Base, available: aarc_entitlement.Base
) -> bool:
return available.satisfies(required)
return available is not None and available.satisfies(required)


def _get_claim_requirement(
Expand Down

0 comments on commit 553d55b

Please sign in to comment.