Skip to content

Commit 6087a3c

Browse files
committed
remove ghost account register.
1 parent 6824823 commit 6087a3c

File tree

7 files changed

+194
-140
lines changed

7 files changed

+194
-140
lines changed

base/src/main/java/com/windscribe/vpn/api/ApiCallManager.kt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
*/
44
package com.windscribe.vpn.api
55

6-
import android.R.attr.password
76
import com.windscribe.vpn.api.response.AddEmailResponse
87
import com.windscribe.vpn.api.response.ApiErrorResponse
98
import com.windscribe.vpn.api.response.AuthToken
@@ -132,15 +131,6 @@ open class ApiCallManager @Inject constructor(
132131
}
133132
}
134133

135-
override fun getReg(): Single<GenericResponseClass<RegToken?, ApiErrorResponse?>> {
136-
return Single.create { sub ->
137-
val callback = wsNetServerAPI.regToken { code, json ->
138-
buildResponse(sub, code, json, RegToken::class.java)
139-
}
140-
sub.setCancellable { callback.cancel() }
141-
}
142-
}
143-
144134
override fun getServerConfig(): Single<GenericResponseClass<String?, ApiErrorResponse?>> {
145135
return Single.create { sub ->
146136
if (checkSession(sub)) return@create

base/src/main/java/com/windscribe/vpn/api/IApiCallManager.kt

Lines changed: 86 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,43 +10,116 @@ interface IApiCallManager {
1010

1111
fun addUserEmailAddress(email: String): Single<GenericResponseClass<AddEmailResponse?, ApiErrorResponse?>>
1212
fun checkConnectivityAndIpAddress(): Single<GenericResponseClass<GetMyIpResponse?, ApiErrorResponse?>>
13-
fun claimAccount(username: String, password: String, email: String, voucherCode: String?): Single<GenericResponseClass<ClaimAccountResponse?, ApiErrorResponse?>>
13+
fun claimAccount(
14+
username: String,
15+
password: String,
16+
email: String,
17+
voucherCode: String?
18+
): Single<GenericResponseClass<ClaimAccountResponse?, ApiErrorResponse?>>
19+
1420
fun getBillingPlans(promo: String?): Single<GenericResponseClass<BillingPlanResponse?, ApiErrorResponse?>>
1521
fun getNotifications(pcpID: String?): Single<GenericResponseClass<NewsFeedNotification?, ApiErrorResponse?>>
1622
fun getPortMap(): Single<GenericResponseClass<PortMapResponse?, ApiErrorResponse?>>
17-
fun getReg(): Single<GenericResponseClass<RegToken?, ApiErrorResponse?>>
1823
fun getServerConfig(): Single<GenericResponseClass<String?, ApiErrorResponse?>>
1924
fun getServerCredentials(extraParams: Map<String, String>? = null): Single<GenericResponseClass<ServerCredentialsResponse?, ApiErrorResponse?>>
2025
fun getServerCredentialsForIKev2(extraParams: Map<String, String>? = null): Single<GenericResponseClass<ServerCredentialsResponse?, ApiErrorResponse?>>
21-
fun getServerList(isPro: Boolean, locHash: String, alcList: Array<String>, overriddenCountryCode: String?): Single<GenericResponseClass<String?, ApiErrorResponse?>>
26+
fun getServerList(
27+
isPro: Boolean,
28+
locHash: String,
29+
alcList: Array<String>,
30+
overriddenCountryCode: String?
31+
): Single<GenericResponseClass<String?, ApiErrorResponse?>>
32+
2233
fun getSessionGeneric(firebaseToken: String?): Single<GenericResponseClass<UserSessionResponse?, ApiErrorResponse?>>
2334
fun getStaticIpList(deviceID: String?): Single<GenericResponseClass<StaticIPResponse?, ApiErrorResponse?>>
24-
fun logUserIn(username: String, password: String, twoFa: String?, secureToken: String?, captchaSolution: String?, captchaTrailX: FloatArray, captchaTrailY: FloatArray): Single<GenericResponseClass<UserLoginResponse?, ApiErrorResponse?>>
35+
fun logUserIn(
36+
username: String,
37+
password: String,
38+
twoFa: String?,
39+
secureToken: String?,
40+
captchaSolution: String?,
41+
captchaTrailX: FloatArray,
42+
captchaTrailY: FloatArray
43+
): Single<GenericResponseClass<UserLoginResponse?, ApiErrorResponse?>>
44+
2545
fun getWebSession(): Single<GenericResponseClass<WebSession?, ApiErrorResponse?>>
2646
fun recordAppInstall(): Single<GenericResponseClass<String?, ApiErrorResponse?>>
2747
fun resendUserEmailAddress(extraParams: Map<String, String>? = null): Single<GenericResponseClass<AddEmailResponse?, ApiErrorResponse?>>
28-
fun sendTicket(supportEmail: String, supportName: String, supportSubject: String, supportMessage: String, supportCategory: String, type: String, channel: String): Single<GenericResponseClass<TicketResponse?, ApiErrorResponse?>>
29-
fun signUserIn(username: String, password: String, referringUsername: String?, email: String?, voucherCode: String?, secureToken: String?, captchaSolution: String?, captchaTrailX: FloatArray, captchaTrailY: FloatArray): Single<GenericResponseClass<UserRegistrationResponse?, ApiErrorResponse?>>
48+
fun sendTicket(
49+
supportEmail: String,
50+
supportName: String,
51+
supportSubject: String,
52+
supportMessage: String,
53+
supportCategory: String,
54+
type: String,
55+
channel: String
56+
): Single<GenericResponseClass<TicketResponse?, ApiErrorResponse?>>
57+
58+
fun signUserIn(
59+
username: String,
60+
password: String,
61+
referringUsername: String?,
62+
email: String?,
63+
voucherCode: String?,
64+
secureToken: String?,
65+
captchaSolution: String?,
66+
captchaTrailX: FloatArray,
67+
captchaTrailY: FloatArray
68+
): Single<GenericResponseClass<UserRegistrationResponse?, ApiErrorResponse?>>
69+
3070
fun claimVoucherCode(voucherCode: String): Single<GenericResponseClass<ClaimVoucherCodeResponse?, ApiErrorResponse?>>
3171
fun signUpUsingToken(token: String): Single<GenericResponseClass<UserRegistrationResponse?, ApiErrorResponse?>>
32-
fun verifyPurchaseReceipt(purchaseToken: String, gpPackageName: String, gpProductId: String, type: String, amazonUserId: String): Single<GenericResponseClass<GenericSuccess?, ApiErrorResponse?>>
72+
fun verifyPurchaseReceipt(
73+
purchaseToken: String,
74+
gpPackageName: String,
75+
gpProductId: String,
76+
type: String,
77+
amazonUserId: String
78+
): Single<GenericResponseClass<GenericSuccess?, ApiErrorResponse?>>
79+
3380
fun verifyExpressLoginCode(loginCode: String): Single<GenericResponseClass<VerifyExpressLoginResponse?, ApiErrorResponse?>>
3481
fun generateXPressLoginCode(): Single<GenericResponseClass<XPressLoginCodeResponse?, ApiErrorResponse?>>
35-
fun verifyXPressLoginCode(loginCode: String, signature: String): Single<GenericResponseClass<XPressLoginVerifyResponse?, ApiErrorResponse?>>
36-
fun postDebugLog(username: String, log: String): Single<GenericResponseClass<GenericSuccess?, ApiErrorResponse?>>
82+
fun verifyXPressLoginCode(
83+
loginCode: String,
84+
signature: String
85+
): Single<GenericResponseClass<XPressLoginVerifyResponse?, ApiErrorResponse?>>
86+
87+
fun postDebugLog(
88+
username: String,
89+
log: String
90+
): Single<GenericResponseClass<GenericSuccess?, ApiErrorResponse?>>
91+
3792
fun postPromoPaymentConfirmation(pcpID: String): Single<GenericResponseClass<GenericSuccess?, ApiErrorResponse?>>
3893
fun getRobertFilters(): Single<GenericResponseClass<RobertFilterResponse?, ApiErrorResponse?>>
39-
fun updateRobertSettings(id: String, status: Int): Single<GenericResponseClass<GenericSuccess?, ApiErrorResponse?>>
94+
fun updateRobertSettings(
95+
id: String,
96+
status: Int
97+
): Single<GenericResponseClass<GenericSuccess?, ApiErrorResponse?>>
98+
4099
fun syncRobert(): Single<GenericResponseClass<GenericSuccess?, ApiErrorResponse?>>
41100
fun deleteSession(): Single<GenericResponseClass<GenericSuccess?, ApiErrorResponse?>>
42-
fun wgInit(clientPublicKey: String, deleteOldestKey: Boolean): Single<GenericResponseClass<WgInitResponse?, ApiErrorResponse?>>
43-
fun wgConnect(clientPublicKey: String, hostname: String, deviceId: String): Single<GenericResponseClass<WgConnectResponse?, ApiErrorResponse?>>
101+
fun wgInit(
102+
clientPublicKey: String,
103+
deleteOldestKey: Boolean
104+
): Single<GenericResponseClass<WgInitResponse?, ApiErrorResponse?>>
105+
106+
fun wgConnect(
107+
clientPublicKey: String,
108+
hostname: String,
109+
deviceId: String
110+
): Single<GenericResponseClass<WgConnectResponse?, ApiErrorResponse?>>
111+
44112
fun sendDecoyTraffic(
45113
url: String,
46114
data: String,
47115
sizeToReceive: String?
48116
): Single<GenericResponseClass<String?, ApiErrorResponse?>>
49-
fun sso(provider: String, token: String): Single<GenericResponseClass<SsoResponse?, ApiErrorResponse?>>
117+
118+
fun sso(
119+
provider: String,
120+
token: String
121+
): Single<GenericResponseClass<SsoResponse?, ApiErrorResponse?>>
122+
50123
fun authTokenSignup(useAsciiCaptcha: Boolean): Single<GenericResponseClass<AuthToken?, ApiErrorResponse?>>
51124
fun authTokenLogin(useAsciiCaptcha: Boolean): Single<GenericResponseClass<AuthToken?, ApiErrorResponse?>>
52125
}

tv/src/main/java/com/windscribe/tv/welcome/WelcomeActivity.kt

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,13 @@ class WelcomeActivity :
158158
}
159159
}
160160

161-
override fun onContinueWithOutAccountClick() {
162-
presenter.startGhostAccountSetup()
161+
override fun onGetStartedClick() {
162+
val signUpFragment = SignUpFragment()
163+
val direction = GravityCompat
164+
.getAbsoluteGravity(GravityCompat.END, resources.configuration.layoutDirection)
165+
signUpFragment.enterTransition = Slide(direction)
166+
.addTarget(R.id.login_sign_up_container)
167+
replaceFragment(signUpFragment, true)
163168
}
164169

165170
override fun onForgotPasswordClick() {
@@ -175,7 +180,13 @@ class WelcomeActivity :
175180
presenter.onGenerateCodeClick()
176181
}
177182

178-
override fun onLoginButtonClick(username: String, password: String, twoFa: String?, secureToken: String?, captcha: String?) {
183+
override fun onLoginButtonClick(
184+
username: String,
185+
password: String,
186+
twoFa: String?,
187+
secureToken: String?,
188+
captcha: String?
189+
) {
179190
presenter.startLoginProcess(username, password, twoFa, secureToken, captcha)
180191
}
181192

@@ -196,7 +207,14 @@ class WelcomeActivity :
196207
secureToken: String?,
197208
captcha: String?
198209
) {
199-
presenter.startSignUpProcess(username, password, email, ignoreEmptyEmail, secureToken, captcha)
210+
presenter.startSignUpProcess(
211+
username,
212+
password,
213+
email,
214+
ignoreEmptyEmail,
215+
secureToken,
216+
captcha
217+
)
200218
}
201219

202220
override fun prepareUiForApiCallFinished() {
@@ -321,10 +339,15 @@ class WelcomeActivity :
321339
}
322340

323341
override fun onAuthLoginClick(username: String, password: String) {
324-
presenter.onAuthLoginClick(username, password)
342+
presenter.onAuthLoginClick(username, password)
325343
}
326344

327-
override fun captchaReceived(username: String, password: String, secureToken: String, captchaArt: String) {
345+
override fun captchaReceived(
346+
username: String,
347+
password: String,
348+
secureToken: String,
349+
captchaArt: String
350+
) {
328351
val fragment: Fragment = CaptchaFragment()
329352
val bundle = Bundle()
330353
bundle.putString("username", username)

tv/src/main/java/com/windscribe/tv/welcome/WelcomePresenter.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ interface WelcomePresenter {
1414
email: String?,
1515
ignoreEmptyEmail: Boolean
1616
)
17-
18-
fun startGhostAccountSetup()
1917
fun startLoginProcess(username: String, password: String, twoFa: String?, secureToken: String?, captcha: String?)
2018
fun startSignUpProcess(
2119
username: String,

0 commit comments

Comments
 (0)