Closed swatosh closed 1 year ago
Oh, this would then be used in the authorization value proc, I see! Good with me, I'd be happy to review a PR with this change 👏.
Quick early feedback: I think testing value.arity
when value.is_a?(Proc)
is unnecessary, as procs don't throw an error when passed more or fewer args than they expect (only lambdas should).
Cool! I'll start working on it for real then.
Thing is, I don't think anything will prevent a user from passing a lambda in, and it will return true for .is_a?(Proc). I appreciate the feedback, I'm pretty unhappy with how that looks ATM even though I left deliberately left it ugly for the diff to be smaller.
Good shout, I always forget about that! Thanks for suggesting this addition 🙏
Thank you so much! Closing now, PR as I'm able
Basic Info
Would a PR that forwards env to Authorization#header_from be considered? If no, I can understand wanting to limit complexity. But something along these lines (simplified to minimize the diff):
Specs and passing rubocop would accompany a real PR if something along these lines would be considered. Where would be the best place to update documentation?
Thanks!