nitram509 / jmacaroons

Pure Java implementation of Macaroons: Cookies with Contextual Caveats for Decentralized Authorization in the Cloud. Android ready. Online playground available. Project is STALE
https://macaroons.io/
Apache License 2.0
115 stars 11 forks source link

Use a more familiar verifier API #37

Closed cyberdelia closed 1 year ago

cyberdelia commented 2 years ago

A change in a similar fashion as the builders one, but for verifiers.

MacaroonsVerifier verifier = macaroon.verifier();
verifier.satisfy("account = 3735928559");

A more subtle change is also hiding here, by using List rather Array where there is no advantages in using Array (which is in holding primitive types).

codecov-commenter commented 2 years ago

Codecov Report

Merging #37 (9765a47) into master (aaa50a4) will decrease coverage by 0.24%. The diff coverage is 70.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #37      +/-   ##
============================================
- Coverage     65.16%   64.92%   -0.25%     
+ Complexity      241      237       -4     
============================================
  Files            25       25              
  Lines          1289     1280       -9     
  Branches        179      177       -2     
============================================
- Hits            840      831       -9     
- Misses          352      355       +3     
+ Partials         97       94       -3     
Impacted Files Coverage Δ
...m/github/nitram509/jmacaroons/util/ArrayTools.java 88.23% <ø> (+4.36%) :arrow_up:
...9/jmacaroons/verifier/TimestampCaveatVerifier.java 88.88% <ø> (ø)
...github/nitram509/jmacaroons/MacaroonsVerifier.java 78.57% <66.66%> (-2.28%) :arrow_down:
...java/com/github/nitram509/jmacaroons/Macaroon.java 70.17% <100.00%> (+0.53%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update aaa50a4...9765a47. Read the comment docs.

nitram509 commented 2 years ago

Thank you very much for your contibution. I will have a look at this PR soon.