https://kotlinlang.org logo
#ktor
Title
# ktor
s

Sean Proctor

06/22/2022, 12:22 PM
I'm attempting to switch some code from okhttp to ktor-client. the server (IP camera) uses digest authentication. My implementation with okhttp uses https://github.com/rburgst/okhttp-digest and works fine. Trying to use ktor, I'm getting authentication errors. The biggest difference that I see is that okhttp-digest has "algorithm=MD5" in the Authorization header, while ktor doesn't. Is there a simple way to add that so I can test if that's the issue or if it's something else?
Well, I've tested adding the algorithm, still no luck. Not sure what the problem is
I think I've found the issue. It seems that the digest is not properly getting the realm from the server.
Yup! It's not using the realm from the server to generate the response!
2 Views