From deced7856cff9d8a25cc2a02207f50666f0b8ef0 Mon Sep 17 00:00:00 2001 From: shriharsh Date: Wed, 27 Dec 2017 09:43:48 +0530 Subject: [PATCH] Issue #14 Chore: Logger type changed from error to debug --- .../keycloak/login/phone/AbstractPhoneFormAuthenticator.java | 4 +--- .../org/sunbird/keycloak/login/phone/PhonePasswordForm.java | 4 ++-- .../keycloak/login/phone/PhonePasswordFormFactory.java | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/keycloak/sms-provider/src/main/java/org/sunbird/keycloak/login/phone/AbstractPhoneFormAuthenticator.java b/keycloak/sms-provider/src/main/java/org/sunbird/keycloak/login/phone/AbstractPhoneFormAuthenticator.java index 56739e68..8f8c2051 100755 --- a/keycloak/sms-provider/src/main/java/org/sunbird/keycloak/login/phone/AbstractPhoneFormAuthenticator.java +++ b/keycloak/sms-provider/src/main/java/org/sunbird/keycloak/login/phone/AbstractPhoneFormAuthenticator.java @@ -42,7 +42,7 @@ public abstract class AbstractPhoneFormAuthenticator extends AbstractUsernameFor public boolean validateUserAndPassword(AuthenticationFlowContext context, MultivaluedMap inputData) { String username = inputData.getFirst(AuthenticationManager.FORM_USERNAME); - logger.error("AbstractPhoneFormAuthenticator@validateUserAndPassword - Username -" + username); + logger.debug("AbstractPhoneFormAuthenticator@validateUserAndPassword - Username -" + username); if (username == null) { context.getEvent().error(Errors.USER_NOT_FOUND); @@ -105,8 +105,6 @@ private UserModel getUser(AuthenticationFlowContext context, String username) { List userModels = session.users().searchForUserByUserAttribute(KeycloakSmsAuthenticatorConstants.ATTR_MOBILE, username, context.getRealm()); if (userModels != null && userModels.size() > 0) { - logger.error("AbstractPhoneFormAuthenticator@getUser : Users List - " + userModels.size()); - logger.error("AbstractPhoneFormAuthenticator@getUser : First User - " + userModels.get(0).getUsername()); return userModels.get(0); } else { return KeycloakModelUtils.findUserByNameOrEmail(context.getSession(), context.getRealm(), username); diff --git a/keycloak/sms-provider/src/main/java/org/sunbird/keycloak/login/phone/PhonePasswordForm.java b/keycloak/sms-provider/src/main/java/org/sunbird/keycloak/login/phone/PhonePasswordForm.java index 4547a174..2179e80d 100755 --- a/keycloak/sms-provider/src/main/java/org/sunbird/keycloak/login/phone/PhonePasswordForm.java +++ b/keycloak/sms-provider/src/main/java/org/sunbird/keycloak/login/phone/PhonePasswordForm.java @@ -44,7 +44,7 @@ public class PhonePasswordForm extends AbstractPhoneFormAuthenticator implements @Override public void action(AuthenticationFlowContext context) { - logger.error("PhonePasswordForm@action - called"); + logger.debug("PhonePasswordForm@action - called"); MultivaluedMap formData = context.getHttpRequest().getDecodedFormParameters(); if (formData.containsKey("cancel")) { context.cancelLogin(); @@ -57,7 +57,7 @@ public void action(AuthenticationFlowContext context) { } protected boolean validateForm(AuthenticationFlowContext context, MultivaluedMap formData) { - logger.error("PhonePasswordForm@validateForm - called"); + logger.debug("PhonePasswordForm@validateForm - called"); return validateUserAndPassword(context, formData); } diff --git a/keycloak/sms-provider/src/main/java/org/sunbird/keycloak/login/phone/PhonePasswordFormFactory.java b/keycloak/sms-provider/src/main/java/org/sunbird/keycloak/login/phone/PhonePasswordFormFactory.java index d3df0db5..7eaed729 100755 --- a/keycloak/sms-provider/src/main/java/org/sunbird/keycloak/login/phone/PhonePasswordFormFactory.java +++ b/keycloak/sms-provider/src/main/java/org/sunbird/keycloak/login/phone/PhonePasswordFormFactory.java @@ -43,7 +43,7 @@ public class PhonePasswordFormFactory implements AuthenticatorFactory { @Override public Authenticator create(KeycloakSession session) { - logger.error("PhonePasswordFormFactory@create - PhonePasswordFormFactory is created"); + logger.debug("PhonePasswordFormFactory@create - PhonePasswordFormFactory is created"); return SINGLETON; }