(refs #139) Add info log for debugging LDAP Auth

This commit is contained in:
Tomofumi Tanaka
2013-10-10 00:57:46 +09:00
parent 195364223f
commit e667b6c139
2 changed files with 8 additions and 2 deletions

View File

@@ -9,9 +9,12 @@ import model.GroupMember
import scala.Some
import model.Account
import util.LDAPUtil
import org.slf4j.LoggerFactory
trait AccountService {
private val logger = LoggerFactory.getLogger(classOf[AccountService])
def authenticate(settings: SystemSettings, userName: String, password: String): Option[Account] =
if(settings.ldapAuthentication){
ldapAuthentication(settings, userName, password)
@@ -41,7 +44,10 @@ trait AccountService {
}
getAccountByUserName(userName)
}
case Left(errorMessage) => defaultAuthentication(userName, password)
case Left(errorMessage) => {
logger.info(s"LDAP Authentication Failed: ${errorMessage}")
defaultAuthentication(userName, password)
}
}
}