This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void should_find_user_by_phone_with_corrected_field_and_date_of_birth_individual_user() { | |
String token = getJwtToken("0707070707"); | |
User response = | |
given() | |
.header("Authorization", "Bearer " + token) | |
.pathParam("phone", "0707070707") | |
.contentType("application/json") | |
.when().get("/api/v1/users/{phone}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FindUserByPhoneHandler implements RequestHandler<Map<String, Object>, ApiGatewayResponse> { | |
private static final DynamoDBUserDao userDao = DynamoDBUserDao.instance(); | |
@Override | |
public ApiGatewayResponse handleRequest(Map<String, Object> input, Context context) { | |
Tuple2<Jws<Claims>, ApiGatewayResponse> jwsParsed = JwtValidator.validateJwt(input, "admin|siteadmin|useradmin|agent|individual|global-admin"); | |
if (jwsParsed._2 != null) { |