-
Notifications
You must be signed in to change notification settings - Fork 786
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
Exposing callable parameters for DigestAuth.challenge #6077
Exposing callable parameters for DigestAuth.challenge #6077
Conversation
Thanks for digging into this! Since you've done the work to preserve bincompat (appreciated!) would you be able to retarget this at a stable branch? |
d1ad171
to
1a17002
Compare
@armanbilge It would be helpful to have this on 0.22, I'm happy to open a PR against 0.23 as well if that's how things work around here 🙂 |
Oh, I see what you mean now. We still do have a usability complication though, as someone not utilizing typeclasses (perhaps a newcomer to the cats ecosystem), attempting to call
not to mention the "overloaded methods define default parameters". I'm still leaning towards |
Oh, good point about
👍 for sure, let's move forward with that for now. |
2f9a79b
to
49a0254
Compare
@armanbilge Alright. |
Oops. Was relying on |
Resolves http4s#6068 NonceKeeper is package-private, so there's no way to construct one, meaning there's no way to call `challenge`. Mirror the same parameters from `apply`, and maintain the previous `challenge` method for bincompat.
…ion/DigestAuth.scala Co-authored-by: Arman Bilge <armanbilge@gmail.com>
In order to achieve the goal of F.delay(new NonceKeeper) but maintaining the original intent of `apply`, just revert everything in this PR, make the original (unusable) `challenge` `private`, and create a new public `challenge` with the necessary parameters, intended for human use, without impacting the existing flow.
…ion/DigestAuth.scala Co-authored-by: Arman Bilge <armanbilge@gmail.com>
81b5b17
to
e15e34a
Compare
OK. Rebased, |
e15e34a
to
5177dfc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work getting it green!
Personally I'd feel a bit funny shipping this without a matching implementation, since without one it's hard to know for sure if we got the constraints right and/or missed anything else. E.g. the note I made below.
nonceCleanupInterval: Duration = 1.hour, | ||
nonceStaleTime: Duration = 1.hour, | ||
nonceBits: Int = 160, | ||
)(implicit F: Sync[F]): F[Kleisli[F, Request[F], Either[Challenge, AuthedRequest[F, A]]]] = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should also become a Concurrent
constraint.
5177dfc
to
f0bf2aa
Compare
So, given this, are we back at where we started, just exposing a new |
We should let another maintainer weigh in.
FWIW I don't think it should be too challenging to fix. The only change really is gating the |
To clarify, I actually agree with your objection. I started trying to rework |
f0bf2aa
to
1091432
Compare
Alright. Rolling this one back to pre |
The intent of this PR is to just get the This might be too much to ask, but I figured since we've got direction on the future work, we could get this one moving. |
Gotcha! I think we should be able to land #6138 in 0.22 :) |
Got it, I misunderstood the direction of the conversation, no worries |
#6138 looks like it's in the home stretch, closing this one out. |
NonceKeeper is package-private, so there's no way to construct one,
meaning there's no way to call
challenge
.Mirror the same parameters from
apply
, and maintain the previouschallenge
method for bincompat.I'm happy to make changes if desired.
Thank you