throw new NotAuthorizedException(L.l("'{0}' has missing authenticator",
credentials));
}
else if (credentials instanceof DigestCredentials) {
DigestCredentials digestCred = (DigestCredentials) credentials;
Principal user = new BasicPrincipal(digestCred.getUserName());
user = auth.authenticate(user, digestCred, null);
if (user == null) {
throw new NotAuthorizedException(L.l("'{0}' has invalid digest credentials",
digestCred.getUserName()));
}
}
else if (credentials instanceof String) {
String password = (String) credentials;