@Test(expected = LoginFailedException.class) public void loginUserErrors() throws LoginFailedException { connection.login("username1", "password1"); }
public void login(String username, String password) throws LoginFailedException { try { String token = getOrFetchToken("login"); try { this.confirmLogin(token, username, password); } catch (NeedLoginTokenException e) { clearToken("login"); token = getOrFetchToken("login"); this.confirmLogin(token, username, password); } } catch (IOException | MediaWikiApiErrorException e1) { throw new LoginFailedException(e1.getMessage(), e1); } }
BasicApiConnection extends ApiConnection { public void login(String username, String password) throws LoginFailedException { try { String token = getOrFetchToken("login"); try { this.confirmLogin(token, username, password); } catch (NeedLoginTokenException e) { clearToken("login"); token = getOrFetchToken("login"); this.confirmLogin(token, username, password); } } catch (IOException | MediaWikiApiErrorException e1) { throw new LoginFailedException(e1.getMessage(), e1); } } }
BasicApiConnection extends ApiConnection { public void login(String username, String password) throws LoginFailedException { try { String token = getOrFetchToken("login"); try { this.confirmLogin(token, username, password); } catch (NeedLoginTokenException e) { clearToken("login"); token = getOrFetchToken("login"); this.confirmLogin(token, username, password); } } catch (IOException | MediaWikiApiErrorException e1) { throw new LoginFailedException(e1.getMessage(), e1); } } BasicApiConnection(String apiBaseUrl); @JsonCreator protected  BasicApiConnection(
			@JsonProperty("baseUrl") String apiBaseUrl,
			@JsonProperty("cookies") List<HttpCookieWrapper> cookies,
			@JsonProperty("username") String username,
			@JsonProperty("loggedIn") boolean loggedIn,
			@JsonProperty("tokens") Map<String, String> tokens,
			@JsonProperty("connectTimeout") int connectTimeout,
			@JsonProperty("readTimeout") int readTimeout); }
BasicApiConnection extends ApiConnection { public void login(String username, String password) throws LoginFailedException { try { String token = getOrFetchToken("login"); try { this.confirmLogin(token, username, password); } catch (NeedLoginTokenException e) { clearToken("login"); token = getOrFetchToken("login"); this.confirmLogin(token, username, password); } } catch (IOException | MediaWikiApiErrorException e1) { throw new LoginFailedException(e1.getMessage(), e1); } } BasicApiConnection(String apiBaseUrl); @JsonCreator protected  BasicApiConnection(
			@JsonProperty("baseUrl") String apiBaseUrl,
			@JsonProperty("cookies") List<HttpCookieWrapper> cookies,
			@JsonProperty("username") String username,
			@JsonProperty("loggedIn") boolean loggedIn,
			@JsonProperty("tokens") Map<String, String> tokens,
			@JsonProperty("connectTimeout") int connectTimeout,
			@JsonProperty("readTimeout") int readTimeout); static BasicApiConnection getTestWikidataApiConnection(); static BasicApiConnection getWikidataApiConnection(); static BasicApiConnection getWikimediaCommonsApiConnection(); void login(String username, String password); @JsonProperty("cookies") List<HttpCookie> getCookies(); void clearCookies(); void logout(); }
BasicApiConnection extends ApiConnection { public void login(String username, String password) throws LoginFailedException { try { String token = getOrFetchToken("login"); try { this.confirmLogin(token, username, password); } catch (NeedLoginTokenException e) { clearToken("login"); token = getOrFetchToken("login"); this.confirmLogin(token, username, password); } } catch (IOException | MediaWikiApiErrorException e1) { throw new LoginFailedException(e1.getMessage(), e1); } } BasicApiConnection(String apiBaseUrl); @JsonCreator protected  BasicApiConnection(
			@JsonProperty("baseUrl") String apiBaseUrl,
			@JsonProperty("cookies") List<HttpCookieWrapper> cookies,
			@JsonProperty("username") String username,
			@JsonProperty("loggedIn") boolean loggedIn,
			@JsonProperty("tokens") Map<String, String> tokens,
			@JsonProperty("connectTimeout") int connectTimeout,
			@JsonProperty("readTimeout") int readTimeout); static BasicApiConnection getTestWikidataApiConnection(); static BasicApiConnection getWikidataApiConnection(); static BasicApiConnection getWikimediaCommonsApiConnection(); void login(String username, String password); @JsonProperty("cookies") List<HttpCookie> getCookies(); void clearCookies(); void logout();  }