ring-clojure / ring-headers

Ring middleware for common response headers
26 stars 12 forks source link

Add support for Authorization request header #11

Closed devurandom closed 8 months ago

devurandom commented 9 months ago

No complete authentication scheme, but the "Access Authentication Framework" defined by RFC 7235, providing the building blocks to implement auth schemes.

Raises dependency on ring-core to 1.8.1. ring.util.parsing/re-value was added in 1.3, but until 1.8.1 it did not capture the content of quoted values without the quotes. This drops support for Clojure 1.5 and 1.6, since 1.8.1 requires Clojure 1.7.

devurandom commented 8 months ago

Thanks for all your work!

You are welcome! Thanks for taking the time to review this!

Can you squash down your commits and give the result an appropriate commit message? Then I'll merge it in and cut a release.

Does https://github.com/ring-clojure/ring-headers/pull/11/commits/fb74d88fd8eb071a5a83c7c1f9000bc2cbe4a7cd work?

weavejester commented 8 months ago

Almost! Git commit messages are typically wrapped at 72 characters, and at least in this repository they're plaintext rather than markdown, so backticks are unnecessary.

I also thought the first paragraph was a little hard to understand, so I rewrote it:

Add support for Authorization header

Add the wrap-authorization middleware for parsing the Authorization
header on the request map. This is not a complete authentication system;
it only parses the auth token and parameters. See RFC 7235 and RFC 9110:

* https://datatracker.ietf.org/doc/html/rfc7235
* https://datatracker.ietf.org/doc/html/rfc9110#section-11

This change raises the dependency on ring-core to 1.8.1, and drops
support for Clojure 1.5 and 1.6.

I also don't think we need to go into too much detail about why we're updating the Ring dependency. Updating dependencies is a natural part of updating a library.

devurandom commented 8 months ago

I changed the commit message in https://github.com/ring-clojure/ring-headers/pull/11/commits/41af011eb2e8734e772eaa12a7056b0fa90ff992.