KEYCLOAK-1280: i18n logging for
org.keycloak.authentication.authenticators.directgrant
This commit is contained in:
parent
36e711fb88
commit
dfb92db2b7
3 changed files with 3 additions and 7 deletions
|
@ -1,6 +1,5 @@
|
|||
package org.keycloak.authentication.authenticators.directgrant;
|
||||
|
||||
import org.jboss.logging.Logger;
|
||||
import org.keycloak.authentication.AuthenticationFlowError;
|
||||
import org.keycloak.authentication.AuthenticationFlowContext;
|
||||
import org.keycloak.events.Errors;
|
||||
|
@ -23,7 +22,6 @@ import java.util.List;
|
|||
*/
|
||||
public class ValidateOTP extends AbstractDirectGrantAuthenticator {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(ValidateOTP.class);
|
||||
public static final String PROVIDER_ID = "direct-grant-validate-otp";
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package org.keycloak.authentication.authenticators.directgrant;
|
||||
|
||||
import org.jboss.logging.Logger;
|
||||
import org.keycloak.authentication.AuthenticationFlowError;
|
||||
import org.keycloak.authentication.AuthenticationFlowContext;
|
||||
import org.keycloak.events.Errors;
|
||||
|
@ -23,7 +22,6 @@ import java.util.List;
|
|||
*/
|
||||
public class ValidatePassword extends AbstractDirectGrantAuthenticator {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(ValidatePassword.class);
|
||||
public static final String PROVIDER_ID = "direct-grant-validate-password";
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package org.keycloak.authentication.authenticators.directgrant;
|
||||
|
||||
import org.jboss.logging.Logger;
|
||||
import org.keycloak.authentication.AuthenticationFlowError;
|
||||
import org.keycloak.authentication.AuthenticationFlowContext;
|
||||
import org.keycloak.authentication.authenticators.browser.AbstractUsernameFormAuthenticator;
|
||||
|
@ -13,6 +12,7 @@ import org.keycloak.models.RealmModel;
|
|||
import org.keycloak.models.UserModel;
|
||||
import org.keycloak.models.utils.KeycloakModelUtils;
|
||||
import org.keycloak.provider.ProviderConfigProperty;
|
||||
import org.keycloak.services.ServicesLogger;
|
||||
import org.keycloak.services.managers.AuthenticationManager;
|
||||
|
||||
import javax.ws.rs.core.MultivaluedMap;
|
||||
|
@ -26,7 +26,7 @@ import java.util.List;
|
|||
*/
|
||||
public class ValidateUsername extends AbstractDirectGrantAuthenticator {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(ValidateUsername.class);
|
||||
private static final ServicesLogger logger = ServicesLogger.ROOT_LOGGER;
|
||||
public static final String PROVIDER_ID = "direct-grant-validate-username";
|
||||
|
||||
@Override
|
||||
|
@ -46,7 +46,7 @@ public class ValidateUsername extends AbstractDirectGrantAuthenticator {
|
|||
try {
|
||||
user = KeycloakModelUtils.findUserByNameOrEmail(context.getSession(), context.getRealm(), username);
|
||||
} catch (ModelDuplicateException mde) {
|
||||
logger.error(mde.getMessage(), mde);
|
||||
logger.modelDuplicateException(mde);
|
||||
Response challengeResponse = errorResponse(Response.Status.UNAUTHORIZED.getStatusCode(), "invalid_request", "Invalid user credentials");
|
||||
context.failure(AuthenticationFlowError.INVALID_USER, challengeResponse);
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue