Skip to content

Commit

Permalink
Issue #14 Chore: Logger type changed from error to debug
Browse files Browse the repository at this point in the history
  • Loading branch information
shriharshs committed Dec 27, 2017
1 parent 1801a11 commit deced78
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public abstract class AbstractPhoneFormAuthenticator extends AbstractUsernameFor

public boolean validateUserAndPassword(AuthenticationFlowContext context, MultivaluedMap<String, String> 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);
Expand Down Expand Up @@ -105,8 +105,6 @@ private UserModel getUser(AuthenticationFlowContext context, String username) {
List<UserModel> 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, String> formData = context.getHttpRequest().getDecodedFormParameters();
if (formData.containsKey("cancel")) {
context.cancelLogin();
Expand All @@ -57,7 +57,7 @@ public void action(AuthenticationFlowContext context) {
}

protected boolean validateForm(AuthenticationFlowContext context, MultivaluedMap<String, String> formData) {
logger.error("PhonePasswordForm@validateForm - called");
logger.debug("PhonePasswordForm@validateForm - called");
return validateUserAndPassword(context, formData);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit deced78

Please sign in to comment.