Fixed potential NPE in DigestScheme

This commit is contained in:
Oleg Kalnichevski 2023-08-13 13:31:10 +02:00
parent 091c822edc
commit e4eada63e4
1 changed files with 3 additions and 1 deletions

View File

@ -238,7 +238,9 @@ public class DigestScheme implements AuthScheme, Serializable {
}
private String createDigestResponse(final HttpRequest request) throws AuthenticationException {
if (credentials == null) {
throw new AuthenticationException("User credentials have not been provided");
}
final String uri = request.getRequestUri();
final String method = request.getMethod();
final String realm = this.paramMap.get("realm");