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
Merged

Conversation

@diesalbla
Copy link
Contributor

@diesalbla diesalbla 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 authentication_simplify branch from 2c248b0 to 85275a0 Apr 26, 2019
Copy link
Member

@rossabaker rossabaker left a comment

Looks good. One scoping request.

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 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
@diesalbla diesalbla deleted the authentication_simplify branch May 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants