Minor fix
This commit is contained in:
parent
296e3eeb4c
commit
651a908d1b
2 changed files with 2 additions and 2 deletions
|
|
@ -23,7 +23,7 @@ public class AuthorizationService {
|
||||||
|
|
||||||
public AuthResult findAuthInfo(String userId, String password) throws Exception {
|
public AuthResult findAuthInfo(String userId, String password) throws Exception {
|
||||||
String hashedPassword = hashPassword(password);
|
String hashedPassword = hashPassword(password);
|
||||||
List<String> productCodes = mapper.findUserProductCodes(userId, hashedPassword);
|
List<String> productCodes = mapper.findUserProductCodes(userId, hashedPassword); // TODO столбец username имеет ограничение на длину. Добавить обработку или валиться с 500?
|
||||||
if (productCodes.isEmpty()) {
|
if (productCodes.isEmpty()) {
|
||||||
return new AuthResult(false, SignalError.ERROR_005);
|
return new AuthResult(false, SignalError.ERROR_005);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
<mapper namespace="ru.nbch.credit_tracker.mapper.scoring.ModelUsersMapper">
|
<mapper namespace="ru.nbch.credit_tracker.mapper.scoring.ModelUsersMapper">
|
||||||
|
|
||||||
<select id="findUserProductCodes" resultType="string">
|
<select id="findUserProductCodes" resultType="java.lang.String">
|
||||||
SELECT PRODUCT
|
SELECT PRODUCT
|
||||||
FROM XMODEL_USERS
|
FROM XMODEL_USERS
|
||||||
WHERE USERNAME = #{userId} AND PASSWORD = #{password}
|
WHERE USERNAME = #{userId} AND PASSWORD = #{password}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue