Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have the library handle challenge management #35

Merged
merged 49 commits into from
Nov 2, 2023
Merged

Conversation

Firehed
Copy link
Owner

@Firehed Firehed commented Nov 2, 2023

The examples so far have all used sessions to manage the active challenges, but not all applications are stateful in this way - namely, most APIs will not be session-based.

Instead, this creates a new ChallengeManagerInterface that handles this for applications. For now there's a single implementation that's still session-based, though (via #30 which I'm reworking) other implementations will be provided (e.g. a cache pool).

The majority of the change here is updating examples and adding tests. Note that this would be a BC break but since the library is still pre-1.0 it's not a concern for practical purposes.

Copy link

codecov bot commented Nov 2, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (ae5e600) 77.30% compared to head (75a5986) 78.16%.

Additional details and impacted files
@@             Coverage Diff              @@
##               main      #35      +/-   ##
============================================
+ Coverage     77.30%   78.16%   +0.86%     
- Complexity      140      147       +7     
============================================
  Files            21       22       +1     
  Lines           467      490      +23     
============================================
+ Hits            361      383      +22     
- Misses          106      107       +1     
Files Coverage Δ
src/CreateResponse.php 91.89% <100.00%> (+0.98%) ⬆️
src/GetResponse.php 94.73% <100.00%> (+0.50%) ⬆️
src/SessionChallengeManager.php 92.85% <92.85%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Firehed Firehed marked this pull request as ready for review November 2, 2023 21:25
@Firehed Firehed merged commit 14bb773 into main Nov 2, 2023
10 checks passed
@Firehed Firehed deleted the challenge-manager branch November 2, 2023 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant