@Test public void testGetUserId() { Long userId = jwtAuthentication.getUserId(mockJwtPayload); assertEquals(USER_ID, userId); }
public Long getUserId(JwtPayload token) { if (token == null) { String message = logMessage.getMessage(JWT_TOKEN_EMPTY); String solution = logMessage.getMessage(JWT_TOKEN_EMPTY_SOLUTION); throw new UnauthorizedUserException(message, solution); } return new Long(token.getUserId()); }
JwtAuthenticationImpl implements JwtAuthentication { public Long getUserId(JwtPayload token) { if (token == null) { String message = logMessage.getMessage(JWT_TOKEN_EMPTY); String solution = logMessage.getMessage(JWT_TOKEN_EMPTY_SOLUTION); throw new UnauthorizedUserException(message, solution); } return new Long(token.getUserId()); } }
JwtAuthenticationImpl implements JwtAuthentication { public Long getUserId(JwtPayload token) { if (token == null) { String message = logMessage.getMessage(JWT_TOKEN_EMPTY); String solution = logMessage.getMessage(JWT_TOKEN_EMPTY_SOLUTION); throw new UnauthorizedUserException(message, solution); } return new Long(token.getUserId()); }  }
JwtAuthenticationImpl implements JwtAuthentication { public Long getUserId(JwtPayload token) { if (token == null) { String message = logMessage.getMessage(JWT_TOKEN_EMPTY); String solution = logMessage.getMessage(JWT_TOKEN_EMPTY_SOLUTION); throw new UnauthorizedUserException(message, solution); } return new Long(token.getUserId()); }  @PostConstruct void init(); Long getUserIdFromAuthorizationHeader(String configurationId, String authorizationHeader); JwtPayload getJwtToken(String configurationId, String authorizationHeader); Long getUserId(JwtPayload token); String authenticate(String configurationId); boolean isValidTokenPair(String configurationId, String applicationToken,
      String symphonyToken); JwtPayload parseJwtPayload(String configurationId, String jwt); @Override boolean checkPodInfo(String configurationId, String podId); }
JwtAuthenticationImpl implements JwtAuthentication { public Long getUserId(JwtPayload token) { if (token == null) { String message = logMessage.getMessage(JWT_TOKEN_EMPTY); String solution = logMessage.getMessage(JWT_TOKEN_EMPTY_SOLUTION); throw new UnauthorizedUserException(message, solution); } return new Long(token.getUserId()); }  @PostConstruct void init(); Long getUserIdFromAuthorizationHeader(String configurationId, String authorizationHeader); JwtPayload getJwtToken(String configurationId, String authorizationHeader); Long getUserId(JwtPayload token); String authenticate(String configurationId); boolean isValidTokenPair(String configurationId, String applicationToken,
      String symphonyToken); JwtPayload parseJwtPayload(String configurationId, String jwt); @Override boolean checkPodInfo(String configurationId, String podId);  }