playframework/play-ws

Got "Digest algorithm not supported: md5" on try use DIGEST

mprosvitlyk opened this issue · 0 comments

As I understand it, when calling the ws.url().withAuth(username, password, WSAuthScheme.DIGEST) function, the MD5 encryption algorithm is selected by default, but it is not supported and I get an error. How can I force DIGEST to use SHA or allow configuration to use MD5?

The project uses:

scala - 2.13.8
play  - 2.8.16
jvm   - openjdk 11.0.16.1 2022-08-12 LTS

**UPD error log

[debug] p.s.a.o.a.n.r.NettyRequestSender - Digest algorithm not supported: md5
java.lang.UnsupportedOperationException: Digest algorithm not supported: md5
at play.shaded.ahc.org.asynchttpclient.Realm$Builder.ha1(Realm.java:504)
at play.shaded.ahc.org.asynchttpclient.Realm$Builder.newResponse(Realm.java:542)
at play.shaded.ahc.org.asynchttpclient.Realm$Builder.build(Realm.java:565)
at play.shaded.ahc.org.asynchttpclient.netty.handler.intercept.Unauthorized401Interceptor.exitAfterHandling401(Unauthorized401Interceptor.java:117)
at play.shaded.ahc.org.asynchttpclient.netty.handler.intercept.Interceptors.exitAfterIntercept(Interceptors.java:89)
at play.shaded.ahc.org.asynchttpclient.netty.handler.HttpHandler.handleHttpResponse(HttpHandler.java:78)
at play.shaded.ahc.org.asynchttpclient.netty.handler.HttpHandler.handleRead(HttpHandler.java:140)
at play.shaded.ahc.org.asynchttpclient.netty.handler.AsyncHttpClientHandler.channelRead(AsyncHttpClientHandler.java:78)
at play.shaded.ahc.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
at play.shaded.ahc.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
[debug] p.s.a.o.a.n.c.ChannelManager - Closing Channel [**secure ip]
[debug] p.s.a.o.a.n.h.HttpHandler - Unexpected I/O exception on channel [id: 0x27d4ea64, **secure ip ! **secure ip]