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

Authentication: simplify code. #2530

Merged
merged 1 commit into from Apr 28, 2019

Conversation

Projects
None yet
3 participants
@diesalbla
Copy link
Contributor

commented Apr 26, 2019

We extract an "unauthorized" function, that generates a response with the "Unatuthorized" status with the given authentication challenge.

We edit the code of challenged, so as to avoid using the Kleisli and OptionT combinators, which can be unclear, and replace them with a slightly more transparent style.

@diesalbla diesalbla force-pushed the diesalbla:authentication_simplify branch from 2c248b0 to 85275a0 Apr 26, 2019

@rossabaker
Copy link
Member

left a comment

Looks good. One scoping request.

Authentication: simplify code.
We extract an "unauthorized" function, that generates a response with the
"Unatuthorized" status with the given authentication challenge.

We edit the code of challenged, so as to avoid using the Kleisli and
OptionT combinators, which can be unclear, and to use instead a
style in which the flatmaps flow as the execution would.

@diesalbla diesalbla force-pushed the diesalbla:authentication_simplify branch from 85275a0 to d7550fb Apr 27, 2019

@aeons

aeons approved these changes Apr 28, 2019

@aeons aeons merged commit 672cd14 into http4s:master Apr 28, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@diesalbla diesalbla deleted the diesalbla:authentication_simplify branch May 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.