@Test public void testSetToken() throws RemoteApiException { authContext.setToken(AUTH_TOKEN1); assertEquals(USER_ID, authContext.getUserId()); assertEquals(AUTH_TOKEN1, authContext.getToken()); assertEquals(AuthenticationToken.VOID_AUTH_TOKEN, authContext.getPreviousToken()); assertTrue(authContext.isAuthenticated()); assertNotNull(authContext.httpClientForContext(SERVICE_NAME)); }
public synchronized void setToken(AuthenticationToken newToken) { if (newToken == null || newToken.equals(AuthenticationToken.VOID_AUTH_TOKEN)) { isTokenValid = false; } else { previousToken = token; token = newToken; isTokenValid = true; } }
UserAuthenticationContext extends AuthenticationContext { public synchronized void setToken(AuthenticationToken newToken) { if (newToken == null || newToken.equals(AuthenticationToken.VOID_AUTH_TOKEN)) { isTokenValid = false; } else { previousToken = token; token = newToken; isTokenValid = true; } } }
UserAuthenticationContext extends AuthenticationContext { public synchronized void setToken(AuthenticationToken newToken) { if (newToken == null || newToken.equals(AuthenticationToken.VOID_AUTH_TOKEN)) { isTokenValid = false; } else { previousToken = token; token = newToken; isTokenValid = true; } } UserAuthenticationContext(String userId, KeyStore keyStore, String keyStorePassword,
      HttpClientConfig httpClientConfig, IntegrationProperties properties); }
UserAuthenticationContext extends AuthenticationContext { public synchronized void setToken(AuthenticationToken newToken) { if (newToken == null || newToken.equals(AuthenticationToken.VOID_AUTH_TOKEN)) { isTokenValid = false; } else { previousToken = token; token = newToken; isTokenValid = true; } } UserAuthenticationContext(String userId, KeyStore keyStore, String keyStorePassword,
      HttpClientConfig httpClientConfig, IntegrationProperties properties); String getUserId(); synchronized AuthenticationToken getToken(); synchronized AuthenticationToken getPreviousToken(); synchronized void setToken(AuthenticationToken newToken); synchronized void invalidateAuthentication(); synchronized boolean isAuthenticated(); }
UserAuthenticationContext extends AuthenticationContext { public synchronized void setToken(AuthenticationToken newToken) { if (newToken == null || newToken.equals(AuthenticationToken.VOID_AUTH_TOKEN)) { isTokenValid = false; } else { previousToken = token; token = newToken; isTokenValid = true; } } UserAuthenticationContext(String userId, KeyStore keyStore, String keyStorePassword,
      HttpClientConfig httpClientConfig, IntegrationProperties properties); String getUserId(); synchronized AuthenticationToken getToken(); synchronized AuthenticationToken getPreviousToken(); synchronized void setToken(AuthenticationToken newToken); synchronized void invalidateAuthentication(); synchronized boolean isAuthenticated();  }