public static AccountInfo loginByPassword(PasswordLoginParams passwordLoginParams) throws InvalidResponseException, InvalidCredentialException, InvalidUserNameException, NeedVerificationException, NeedCaptchaException, IOException, AccessDeniedException, AuthenticationFailureException, NeedNotificationException {
if (passwordLoginParams = = null || passwordLoginParams.password = = null) {
throw new IllegalArgumentException( "password params should not be null" ); } String str = passwordLoginParams.userId; String str2 = passwordLoginParams.password; String str3 = passwordLoginParams.deviceId; String str4 = TextUtils.isEmpty(passwordLoginParams.serviceId) ? PASSPORT_SID : passwordLoginParams.serviceId; String str5 = passwordLoginParams.captIck; String str6 = passwordLoginParams.captCode; String[] strArr = passwordLoginParams.hashedEnvFactors; boolean z = passwordLoginParams.returnStsUrl; boolean z2 = passwordLoginParams.needProcessNotification; MetaLoginData metaLoginData = passwordLoginParams.metaLoginData; ActivatorPhoneInfo activatorPhoneInfo = passwordLoginParams.activatorPhoneInfo; EasyMap easyPut = new EasyMap().easyPutOpt(ProfileRecordUtils.Area.f6514a, str ).easyPut(a.e, CloudCoder.getMd5DigestUpperCase(str2)).easyPutOpt( "sid" , str4).easyPutOpt( "captCode" , str6).easyPutOpt(d.p, passwordLoginParams.countryCode).easyPut( "_json" , Constants.SdkSettings.VALUE_TRUE); addEnvToParams(easyPut, strArr); EasyMap easyPutOpt = new EasyMap().easyPutOpt( "ick" , str5).easyPutOpt( "ticketToken" , passwordLoginParams.ticketToken); addDeviceIdInCookies(easyPutOpt, str3); addAntiSpamIpAddressInCookies(easyPutOpt); if (activatorPhoneInfo ! = null) {
easyPut.easyPutOpt( "userHash" , activatorPhoneInfo.phoneHash); easyPutOpt.easyPutOpt( "activatorToken" , activatorPhoneInfo.activatorToken); } String str7 = URLs.URL_LOGIN_AUTH2_HTTPS; PassportRequestArguments passportRequestArguments = new PassportRequestArguments(); passportRequestArguments.putAllParams(easyPut); pass
|