Hi Oleg,

thanks for the fast answer.

I want to ensure, that I haven't overseen it.

> HOWEVER, there is AbstractHttpServerAuthFilter (or its async equivalent AbstractAsyncServerAuthFilter) that can be used as a foundation for any arbitrary server-side authentication scheme.

I will give that a try.

br
Achim

Am 28.10.24 um 12:55 schrieb Oleg Kalnichevski:
On 28/10/2024 12:28, Achim Kraus wrote:
Dear list,

I tried to find out how to test the authentication variants (BASIC and DIGEST) documented in

https://hc.apache.org/httpcomponents-client-4.5.x/current/tutorial/html/authentication.html

But I failed to find some server side support in HttpCore 5.3.1.

https://lists.apache.org/list.html?d...@hc.apache.org authentication

Is there some server-side support for BASIC or DIGEST authentication?
Else then craft a own response with SC_UNAUTHORIZED and WWW_AUTHENTICATE?

br
Achim


Achim,

For various reasons, mostly historic, server-side functionality of HttpCore has been kept at the minimum. Presently there no server-side focused project similar to HttpClient on the client side, and there is no out-of-the-box support for server-side Basic and Digest authentication.

HOWEVER, there is AbstractHttpServerAuthFilter (or its async equivalent AbstractAsyncServerAuthFilter) that can be used as a foundation for any arbitrary server-side authentication scheme.

Please take a look at the HttpCore server-side filter examples. This may help you roll out your own Basic authentication support based on that class.

classic:
https://github.com/apache/httpcomponents-core/blob/master/httpcore5/src/test/java/org/apache/hc/core5/http/examples/ClassicServerFilterExample.java

async:
https://github.com/apache/httpcomponents-core/blob/master/httpcore5/src/test/java/org/apache/hc/core5/http/examples/AsyncServerFilterExample.java#L84

Oleg

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
For additional commands, e-mail: httpclient-users-h...@hc.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
For additional commands, e-mail: httpclient-users-h...@hc.apache.org

Reply via email to