Skip to content

Conversation

@djc
Copy link
Owner

@djc djc commented Mar 11, 2025

Here's an attempt at making the API a little more restricted while also moving more logic into the library. I quite like it, but curious for your thoughts. It also helps a little with the boilerplate across examples/tests.

I guess one downside is that this only exposes ChallengeHandle::set_ready() which is only accessible indirectly. So if you want to gather all the challenges (across authorizations) and then mark them ready in one go (so you can do a single transaction or whatever against your DNS server or other challenge response infrastructure), you have to iterate over the authorizations and get the challenges twice. Maybe not a big deal?

@djc djc requested a review from cpu March 11, 2025 15:52
@djc djc force-pushed the auth-handle branch 3 times, most recently from 585cd1d to bc55313 Compare March 12, 2025 09:53
@cpu
Copy link
Collaborator

cpu commented Mar 12, 2025

I'll take a look at this soon. Thanks!

Copy link
Collaborator

@cpu cpu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! This is really cool and not how I was thinking of approaching this. I like the end result 👍

I had a handful of comments but they're basically all related to documentation/comments.

@djc
Copy link
Owner Author

djc commented Mar 16, 2025

Cool! What do you think of the Handle suffixes? I don't love them but couldn't think of anything better.

@cpu
Copy link
Collaborator

cpu commented Mar 16, 2025

Cool! What do you think of the Handle suffixes? I don't love them but couldn't think of anything better.

I felt the same. Any alternatives I could think up felt even more awkward.

@djc djc merged commit 685f4c1 into main Mar 17, 2025
9 checks passed
@djc djc deleted the auth-handle branch March 17, 2025 09:48
@djc
Copy link
Owner Author

djc commented Mar 17, 2025

Merged this but happy to take additional feedback on the comments/changes.

@djc djc mentioned this pull request Jul 9, 2025
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.

3 participants