return this;
}
@Override
protected boolean activateSession() {
if (!get(new BankRequest(BASE_URI).skipAuthentication(true)).ok()) {
return false;
}
BankRequest loginRequest = new BankRequest(LOGIN_URL).skipAuthentication(true)
.addParam("request_type", "LogLogonHandler")
.addParam("Face", "sv_SE")
.addParam("DestPage", AmericanExpressAccountService.ACCOUNTS_URL)
.addParam("Logon", "Continue...")
.addParam("UserID", mUsername)
.addParam("Password", mPassword);
BankResponse loginResponse = post(loginRequest);
if (isLoginSuccessful(loginResponse)) {
this.setSessionActive(true);
getCache()
.put(new BankRequest(AmericanExpressAccountService.ACCOUNTS_URL),
loginResponse);
return true;
}
return false;
}