Make r.m.authorization/parse-authorization public#14
Make r.m.authorization/parse-authorization public#14devurandom wants to merge 1 commit intoring-clojure:masterfrom
Conversation
798d410 to
15cab0c
Compare
458e35a to
a76dd57
Compare
Make the existing ring.middleware.authorization/parse-authorization function public and make it take the Authorization header value as input. According to RFC 7235 Section 2 and RFC 9110 Section 11, the value credentials of the Authorization HTTP request header has the same structure as each of the comma-separated challenges of the WWW-Authenticate HTTP response header, which allows to reuse this function also for parsing responses: * https://datatracker.ietf.org/doc/html/rfc7235#section-2 * https://datatracker.ietf.org/doc/html/rfc9110#section-11
a76dd57 to
e848e51
Compare
|
Is the purpose of making this function public to parse the www-authenticate response header? Could you expand on the use-case you expect for this function? |
Yes, since My use case is implementing this flow: https://docs.docker.com/reference/api/registry/auth/ |
Make the existing
ring.middleware.authorization/parse-authorizationfunction public and make it take the
Authorizationheader value asinput.
According to RFC 7235 Section 2 and RFC 9110 Section 11, the value
credentialsof theAuthorizationHTTP request header has the samestructure as each of the comma-separated
challenges of theWWW-AuthenticateHTTP response header, which allows to reuse thisfunction also for parsing responses: