gokrb5
gokrb5 copied to clipboard
spnego: Support proxy authentication
I'd like to add support for HTTP proxy authentication. I think the changes would basically be limited to header names and status codes:
Authorization -> Proxy-Authorization WWW-Authenticate -> Proxy-Authenticate http.StatusUnauthorized -> http.StatusProxyAuthRequired
The biggest question is where to put the switch between the two modes. I would suggest a new function, perhaps SPNEGOKRB5ProxyAuthenticate
. Then that function and SPNEGOKRB5Authenticate
would both call an unexported function with an extra parameter which would switch between regular HTTP authentication and proxy authentication.
What do you think?
I needed similar flexibility for other features and suggested PR #391. I think your use case could technically be integrated in that approach too. However be aware that it is currently pending review.
Hi! Please take a look at this PR: https://github.com/jcmturner/gokrb5/pull/535
I'm glad to see it's being added, but we already found another solution to our problem, so I can't really test it at this point.