Akash kamati
02/22/2025, 3:59 AMinstall(StatusPages) {
statusFile(HttpStatusCode.Unauthorized, HttpStatusCode.BadRequest, filePattern = "errors/error#.html")
}
install(Authentication){
digest("digest-auth") {
realm = myRealm
digestProvider { userName, _ ->
userTable[userName]
}
validate { credentials ->
if (credentials.userName.isNotEmpty()) {
CustomPrincipal(credentials.userName, credentials.realm)
} else {
null
}
}
}
}
the WWW-Authenticate
response header is missing, which breaks the Digest Authentication flow.
If I remove statusFile(...)
, the header is included, and everything works fine.
Is there a way to use statusFile(...)
without losing the WWW-Authenticate
header? Or is this expected behavior?
Would appreciate any insights. Thanks!Aleksei Tirman [JB]
02/24/2025, 9:48 AM