@Test public void testLogout() throws IOException, InterruptedException { assertTrue(connection.isLoggedIn()); assertEquals("foo", connection.getCurrentUser()); connection.logout(); assertEquals("", connection.getCurrentUser()); assertFalse(connection.isLoggedIn()); assertEquals("", connection.getCurrentUser()); RecordedRequest request = server.takeRequest(); assertNotNull(request.getHeader("Authorization")); }
@Override public void logout() { consumerKey = null; consumerSecret = null; accessToken = null; accessSecret = null; username = ""; loggedIn = false; }
OAuthApiConnection extends ApiConnection { @Override public void logout() { consumerKey = null; consumerSecret = null; accessToken = null; accessSecret = null; username = ""; loggedIn = false; } }
OAuthApiConnection extends ApiConnection { @Override public void logout() { consumerKey = null; consumerSecret = null; accessToken = null; accessSecret = null; username = ""; loggedIn = false; } OAuthApiConnection(String apiBaseUrl,
                              String consumerKey,
                              String consumerSecret,
                              String accessToken,
                              String accessSecret); @JsonCreator protected  OAuthApiConnection(
            @JsonProperty("baseUrl") String apiBaseUrl,
            @JsonProperty("consumerKey") String consumerKey,
            @JsonProperty("consumerSecret") String consumerSecret,
            @JsonProperty("accessToken") String accessToken,
            @JsonProperty("accessSecret") String accessSecret,
            @JsonProperty("username") String username,
            @JsonProperty("loggedIn") boolean loggedIn,
            @JsonProperty("tokens") Map<String, String> tokens,
            @JsonProperty("connectTimeout") int connectTimeout,
            @JsonProperty("readTimeout") int readTimeout); }
OAuthApiConnection extends ApiConnection { @Override public void logout() { consumerKey = null; consumerSecret = null; accessToken = null; accessSecret = null; username = ""; loggedIn = false; } OAuthApiConnection(String apiBaseUrl,
                              String consumerKey,
                              String consumerSecret,
                              String accessToken,
                              String accessSecret); @JsonCreator protected  OAuthApiConnection(
            @JsonProperty("baseUrl") String apiBaseUrl,
            @JsonProperty("consumerKey") String consumerKey,
            @JsonProperty("consumerSecret") String consumerSecret,
            @JsonProperty("accessToken") String accessToken,
            @JsonProperty("accessSecret") String accessSecret,
            @JsonProperty("username") String username,
            @JsonProperty("loggedIn") boolean loggedIn,
            @JsonProperty("tokens") Map<String, String> tokens,
            @JsonProperty("connectTimeout") int connectTimeout,
            @JsonProperty("readTimeout") int readTimeout); @Override void logout(); @Override void checkCredentials(); @Override @JsonProperty("username") String getCurrentUser(); @JsonProperty("consumerKey") String getConsumerKey(); @JsonProperty("consumerSecret") String getConsumerSecret(); @JsonProperty("accessToken") String getAccessToken(); @JsonProperty("accessSecret") String getAccessSecret(); }
OAuthApiConnection extends ApiConnection { @Override public void logout() { consumerKey = null; consumerSecret = null; accessToken = null; accessSecret = null; username = ""; loggedIn = false; } OAuthApiConnection(String apiBaseUrl,
                              String consumerKey,
                              String consumerSecret,
                              String accessToken,
                              String accessSecret); @JsonCreator protected  OAuthApiConnection(
            @JsonProperty("baseUrl") String apiBaseUrl,
            @JsonProperty("consumerKey") String consumerKey,
            @JsonProperty("consumerSecret") String consumerSecret,
            @JsonProperty("accessToken") String accessToken,
            @JsonProperty("accessSecret") String accessSecret,
            @JsonProperty("username") String username,
            @JsonProperty("loggedIn") boolean loggedIn,
            @JsonProperty("tokens") Map<String, String> tokens,
            @JsonProperty("connectTimeout") int connectTimeout,
            @JsonProperty("readTimeout") int readTimeout); @Override void logout(); @Override void checkCredentials(); @Override @JsonProperty("username") String getCurrentUser(); @JsonProperty("consumerKey") String getConsumerKey(); @JsonProperty("consumerSecret") String getConsumerSecret(); @JsonProperty("accessToken") String getAccessToken(); @JsonProperty("accessSecret") String getAccessSecret();  }