@Test(expected = UnexpectedBootstrapException.class) public void testGetIntegrationAndCheckAvailabilityNull() { doReturn(null).when(integrationBridge).getIntegrationById(MOCK_CONFIG_ID); jwtAuthentication.isValidTokenPair(MOCK_CONFIG_ID, MOCK_APP_TOKEN, MOCK_SYMPHONY_TOKEN); }
public boolean isValidTokenPair(String configurationId, String applicationToken, String symphonyToken) { Integration integration = getIntegrationAndCheckAvailability(configurationId); String sessionToken = authenticationProxy.getSessionToken(integration.getSettings().getType()); AppToken bothTokens = apiClient.getAppAuthenticationToken(sessionToken, configurationId, applicationToken); if (bothTokens == null) { return false; } return symphonyToken.equals(bothTokens.getSymphonyToken()); }
JwtAuthenticationImpl implements JwtAuthentication { public boolean isValidTokenPair(String configurationId, String applicationToken, String symphonyToken) { Integration integration = getIntegrationAndCheckAvailability(configurationId); String sessionToken = authenticationProxy.getSessionToken(integration.getSettings().getType()); AppToken bothTokens = apiClient.getAppAuthenticationToken(sessionToken, configurationId, applicationToken); if (bothTokens == null) { return false; } return symphonyToken.equals(bothTokens.getSymphonyToken()); } }
JwtAuthenticationImpl implements JwtAuthentication { public boolean isValidTokenPair(String configurationId, String applicationToken, String symphonyToken) { Integration integration = getIntegrationAndCheckAvailability(configurationId); String sessionToken = authenticationProxy.getSessionToken(integration.getSettings().getType()); AppToken bothTokens = apiClient.getAppAuthenticationToken(sessionToken, configurationId, applicationToken); if (bothTokens == null) { return false; } return symphonyToken.equals(bothTokens.getSymphonyToken()); }  }
JwtAuthenticationImpl implements JwtAuthentication { public boolean isValidTokenPair(String configurationId, String applicationToken, String symphonyToken) { Integration integration = getIntegrationAndCheckAvailability(configurationId); String sessionToken = authenticationProxy.getSessionToken(integration.getSettings().getType()); AppToken bothTokens = apiClient.getAppAuthenticationToken(sessionToken, configurationId, applicationToken); if (bothTokens == null) { return false; } return symphonyToken.equals(bothTokens.getSymphonyToken()); }  @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 boolean isValidTokenPair(String configurationId, String applicationToken, String symphonyToken) { Integration integration = getIntegrationAndCheckAvailability(configurationId); String sessionToken = authenticationProxy.getSessionToken(integration.getSettings().getType()); AppToken bothTokens = apiClient.getAppAuthenticationToken(sessionToken, configurationId, applicationToken); if (bothTokens == null) { return false; } return symphonyToken.equals(bothTokens.getSymphonyToken()); }  @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);  }