.class public final Lcom/discord/stores/StoreAuthentication; .super Lcom/discord/stores/Store; .source "StoreAuthentication.kt" # annotations .annotation system Ldalvik/annotation/MemberClasses; value = { Lcom/discord/stores/StoreAuthentication$AuthRequestParams;, Lcom/discord/stores/StoreAuthentication$Companion; } .end annotation # static fields .field public static final CACHE_KEY_EMAIL:Ljava/lang/String; = "STORE_AUTHED_EMAIL" .field public static final CACHE_KEY_FINGERPRINT:Ljava/lang/String; = "STORE_AUTHED_FINGERPRINT" .field public static final CACHE_KEY_TOKEN:Ljava/lang/String; = "STORE_AUTHED_TOKEN" .field public static final Companion:Lcom/discord/stores/StoreAuthentication$Companion; # instance fields .field public _isConsentRequired:Ljava/lang/Boolean; .field public ageGateError:Lrx/subjects/BehaviorSubject; .annotation system Ldalvik/annotation/Signature; value = { "Lrx/subjects/BehaviorSubject<", "Ljava/lang/String;", ">;" } .end annotation .end field .field public authToken:Ljava/lang/String; .field public final dispatcher:Lcom/discord/stores/Dispatcher; .field public email:Ljava/lang/String; .field public fingerprint:Ljava/lang/String; .field public final fingerprintSubject:Lrx/subjects/SerializedSubject; .annotation system Ldalvik/annotation/Signature; value = { "Lrx/subjects/SerializedSubject<", "Ljava/lang/String;", "Ljava/lang/String;", ">;" } .end annotation .end field .field public isConsentRequiredSubscription:Lrx/Subscription; .field public final oauthUriSubject:Lrx/subjects/SerializedSubject; .annotation system Ldalvik/annotation/Signature; value = { "Lrx/subjects/SerializedSubject<", "Landroid/net/Uri;", "Landroid/net/Uri;", ">;" } .end annotation .end field .field public final storeStream:Lcom/discord/stores/StoreStream; .field public final tokenSubject:Lrx/subjects/SerializedSubject; .annotation system Ldalvik/annotation/Signature; value = { "Lrx/subjects/SerializedSubject<", "Ljava/lang/String;", "Ljava/lang/String;", ">;" } .end annotation .end field .field public final userInitiatedAuthEventSubject:Lrx/subjects/PublishSubject; .annotation system Ldalvik/annotation/Signature; value = { "Lrx/subjects/PublishSubject<", "Ljava/lang/Boolean;", ">;" } .end annotation .end field # direct methods .method public static constructor ()V .locals 2 new-instance v0, Lcom/discord/stores/StoreAuthentication$Companion; const/4 v1, 0x0 invoke-direct {v0, v1}, Lcom/discord/stores/StoreAuthentication$Companion;->(Lkotlin/jvm/internal/DefaultConstructorMarker;)V sput-object v0, Lcom/discord/stores/StoreAuthentication;->Companion:Lcom/discord/stores/StoreAuthentication$Companion; return-void .end method .method public constructor (Lcom/discord/stores/StoreStream;Lcom/discord/stores/Dispatcher;)V .locals 1 const-string v0, "storeStream" invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const-string v0, "dispatcher" invoke-static {p2, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V invoke-direct {p0}, Lcom/discord/stores/Store;->()V iput-object p1, p0, Lcom/discord/stores/StoreAuthentication;->storeStream:Lcom/discord/stores/StoreStream; iput-object p2, p0, Lcom/discord/stores/StoreAuthentication;->dispatcher:Lcom/discord/stores/Dispatcher; invoke-static {}, Lrx/subjects/PublishSubject;->g0()Lrx/subjects/PublishSubject; move-result-object p1 iput-object p1, p0, Lcom/discord/stores/StoreAuthentication;->userInitiatedAuthEventSubject:Lrx/subjects/PublishSubject; new-instance p1, Lrx/subjects/SerializedSubject; invoke-static {}, Lrx/subjects/BehaviorSubject;->g0()Lrx/subjects/BehaviorSubject; move-result-object p2 invoke-direct {p1, p2}, Lrx/subjects/SerializedSubject;->(Lrx/subjects/Subject;)V iput-object p1, p0, Lcom/discord/stores/StoreAuthentication;->fingerprintSubject:Lrx/subjects/SerializedSubject; new-instance p1, Lrx/subjects/SerializedSubject; invoke-static {}, Lrx/subjects/BehaviorSubject;->g0()Lrx/subjects/BehaviorSubject; move-result-object p2 invoke-direct {p1, p2}, Lrx/subjects/SerializedSubject;->(Lrx/subjects/Subject;)V iput-object p1, p0, Lcom/discord/stores/StoreAuthentication;->tokenSubject:Lrx/subjects/SerializedSubject; invoke-static {}, Lrx/subjects/BehaviorSubject;->g0()Lrx/subjects/BehaviorSubject; move-result-object p1 const-string p2, "BehaviorSubject.create()" invoke-static {p1, p2}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V iput-object p1, p0, Lcom/discord/stores/StoreAuthentication;->ageGateError:Lrx/subjects/BehaviorSubject; new-instance p1, Lrx/subjects/SerializedSubject; sget-object p2, Landroid/net/Uri;->EMPTY:Landroid/net/Uri; invoke-static {p2}, Lrx/subjects/BehaviorSubject;->h0(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject; move-result-object p2 invoke-direct {p1, p2}, Lrx/subjects/SerializedSubject;->(Lrx/subjects/Subject;)V iput-object p1, p0, Lcom/discord/stores/StoreAuthentication;->oauthUriSubject:Lrx/subjects/SerializedSubject; return-void .end method .method public static final synthetic access$dispatchLogin(Lcom/discord/stores/StoreAuthentication;Lcom/discord/models/domain/auth/ModelLoginResult;)V .locals 0 invoke-direct {p0, p1}, Lcom/discord/stores/StoreAuthentication;->dispatchLogin(Lcom/discord/models/domain/auth/ModelLoginResult;)V return-void .end method .method public static final synthetic access$getFingerprintSnapshotOrGenerate(Lcom/discord/stores/StoreAuthentication;)Lrx/Observable; .locals 0 invoke-direct {p0}, Lcom/discord/stores/StoreAuthentication;->getFingerprintSnapshotOrGenerate()Lrx/Observable; move-result-object p0 return-object p0 .end method .method public static final synthetic access$getStoreStream$p(Lcom/discord/stores/StoreAuthentication;)Lcom/discord/stores/StoreStream; .locals 0 iget-object p0, p0, Lcom/discord/stores/StoreAuthentication;->storeStream:Lcom/discord/stores/StoreStream; return-object p0 .end method .method public static final synthetic access$isConsentRequired$p(Lcom/discord/stores/StoreAuthentication;)Z .locals 0 invoke-virtual {p0}, Lcom/discord/stores/StoreAuthentication;->isConsentRequired()Z move-result p0 return p0 .end method .method public static final synthetic access$isConsentRequiredSubscription$p(Lcom/discord/stores/StoreAuthentication;)Lrx/Subscription; .locals 0 iget-object p0, p0, Lcom/discord/stores/StoreAuthentication;->isConsentRequiredSubscription:Lrx/Subscription; return-object p0 .end method .method public static final synthetic access$setConsentRequired$p(Lcom/discord/stores/StoreAuthentication;Z)V .locals 0 invoke-direct {p0, p1}, Lcom/discord/stores/StoreAuthentication;->setConsentRequired(Z)V return-void .end method .method public static final synthetic access$setConsentRequiredSubscription$p(Lcom/discord/stores/StoreAuthentication;Lrx/Subscription;)V .locals 0 iput-object p1, p0, Lcom/discord/stores/StoreAuthentication;->isConsentRequiredSubscription:Lrx/Subscription; return-void .end method .method private final dispatchLogin(Lcom/discord/models/domain/auth/ModelLoginResult;)V .locals 2 iget-object v0, p0, Lcom/discord/stores/StoreAuthentication;->dispatcher:Lcom/discord/stores/Dispatcher; new-instance v1, Lcom/discord/stores/StoreAuthentication$dispatchLogin$1; invoke-direct {v1, p0, p1}, Lcom/discord/stores/StoreAuthentication$dispatchLogin$1;->(Lcom/discord/stores/StoreAuthentication;Lcom/discord/models/domain/auth/ModelLoginResult;)V invoke-virtual {v0, v1}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V return-void .end method .method private final getFingerprintSnapshotOrGenerate()Lrx/Observable; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "()", "Lrx/Observable<", "Ljava/lang/String;", ">;" } .end annotation iget-object v0, p0, Lcom/discord/stores/StoreAuthentication;->fingerprintSubject:Lrx/subjects/SerializedSubject; const/4 v1, 0x1 invoke-virtual {v0, v1}, Lrx/Observable;->V(I)Lrx/Observable; move-result-object v0 sget-object v1, Lcom/discord/stores/StoreAuthentication$getFingerprintSnapshotOrGenerate$1;->INSTANCE:Lcom/discord/stores/StoreAuthentication$getFingerprintSnapshotOrGenerate$1; invoke-virtual {v0, v1}, Lrx/Observable;->U(Lt0/k/b;)Lrx/Observable; move-result-object v0 new-instance v1, Lcom/discord/stores/StoreAuthentication$getFingerprintSnapshotOrGenerate$2; invoke-direct {v1, p0}, Lcom/discord/stores/StoreAuthentication$getFingerprintSnapshotOrGenerate$2;->(Lcom/discord/stores/StoreAuthentication;)V invoke-virtual {v0, v1}, Lrx/Observable;->t(Lrx/functions/Action1;)Lrx/Observable; move-result-object v0 const-string v1, "fingerprintSubject\n \u2026int(fingerprint, false) }" invoke-static {v0, v1}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V return-object v0 .end method .method public static synthetic register$default(Lcom/discord/stores/StoreAuthentication;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/String;ILjava/lang/Object;)Lrx/Observable; .locals 7 and-int/lit8 p7, p7, 0x20 if-eqz p7, :cond_0 const/4 p6, 0x0 :cond_0 move-object v6, p6 move-object v0, p0 move-object v1, p1 move-object v2, p2 move-object v3, p3 move-object v4, p4 move v5, p5 invoke-virtual/range {v0 .. v6}, Lcom/discord/stores/StoreAuthentication;->register(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/String;)Lrx/Observable; move-result-object p0 return-object p0 .end method .method private final declared-synchronized resetIsConsentRequired()V .locals 2 monitor-enter p0 const/4 v0, 0x0 :try_start_0 iput-object v0, p0, Lcom/discord/stores/StoreAuthentication;->_isConsentRequired:Ljava/lang/Boolean; iget-object v1, p0, Lcom/discord/stores/StoreAuthentication;->isConsentRequiredSubscription:Lrx/Subscription; if-eqz v1, :cond_0 invoke-interface {v1}, Lrx/Subscription;->unsubscribe()V :cond_0 iput-object v0, p0, Lcom/discord/stores/StoreAuthentication;->isConsentRequiredSubscription:Lrx/Subscription; :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 monitor-exit p0 return-void :catchall_0 move-exception v0 monitor-exit p0 throw v0 .end method .method private final declared-synchronized setConsentRequired(Z)V .locals 0 monitor-enter p0 :try_start_0 invoke-static {p1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean; move-result-object p1 iput-object p1, p0, Lcom/discord/stores/StoreAuthentication;->_isConsentRequired:Ljava/lang/Boolean; :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 monitor-exit p0 return-void :catchall_0 move-exception p1 monitor-exit p0 throw p1 .end method .method private final setEmail(Ljava/lang/String;)V .locals 2 iput-object p1, p0, Lcom/discord/stores/StoreAuthentication;->email:Ljava/lang/String; const/4 v0, 0x0 invoke-static {v0, p1, v0}, Lcom/discord/app/AppLog;->h(Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;)V invoke-virtual {p0}, Lcom/discord/stores/Store;->getPrefsSessionDurable()Landroid/content/SharedPreferences; move-result-object v0 invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor; move-result-object v0 const-string v1, "STORE_AUTHED_EMAIL" invoke-interface {v0, v1, p1}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor; move-result-object p1 invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->apply()V return-void .end method # virtual methods .method public final authMFA(Ljava/lang/String;Ljava/lang/String;)Lrx/Observable; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/lang/String;", "Ljava/lang/String;", ")", "Lrx/Observable<", "Lcom/discord/models/domain/auth/ModelLoginResult;", ">;" } .end annotation const-string v0, "code" invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const-string v0, "ticket" invoke-static {p2, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V sget-object v0, Lcom/discord/utilities/rest/RestAPI;->Companion:Lcom/discord/utilities/rest/RestAPI$Companion; invoke-virtual {v0}, Lcom/discord/utilities/rest/RestAPI$Companion;->getApi()Lcom/discord/utilities/rest/RestAPI; move-result-object v0 new-instance v1, Lcom/discord/restapi/RestAPIParams$MFALogin; invoke-direct {v1, p2, p1}, Lcom/discord/restapi/RestAPIParams$MFALogin;->(Ljava/lang/String;Ljava/lang/String;)V invoke-virtual {v0, v1}, Lcom/discord/utilities/rest/RestAPI;->postMFACode(Lcom/discord/restapi/RestAPIParams$MFALogin;)Lrx/Observable; move-result-object p1 const/4 p2, 0x0 const/4 v0, 0x1 const/4 v1, 0x0 invoke-static {p1, p2, v0, v1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn$default(Lrx/Observable;ZILjava/lang/Object;)Lrx/Observable; move-result-object p1 new-instance p2, Lcom/discord/stores/StoreAuthentication$authMFA$1; invoke-direct {p2, p0}, Lcom/discord/stores/StoreAuthentication$authMFA$1;->(Lcom/discord/stores/StoreAuthentication;)V invoke-virtual {p1, p2}, Lrx/Observable;->t(Lrx/functions/Action1;)Lrx/Observable; move-result-object p1 const-string p2, "RestAPI\n .api\n \u2026in(loginResult)\n }" invoke-static {p1, p2}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V return-object p1 .end method .method public final forgotPassword(Ljava/lang/String;)Lrx/Observable; .locals 3 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/lang/String;", ")", "Lrx/Observable<", "Ljava/lang/Void;", ">;" } .end annotation const-string v0, "email" invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V sget-object v0, Lcom/discord/utilities/rest/RestAPI;->Companion:Lcom/discord/utilities/rest/RestAPI$Companion; invoke-virtual {v0}, Lcom/discord/utilities/rest/RestAPI$Companion;->getApi()Lcom/discord/utilities/rest/RestAPI; move-result-object v0 new-instance v1, Lcom/discord/restapi/RestAPIParams$ForgotPassword; invoke-direct {v1, p1}, Lcom/discord/restapi/RestAPIParams$ForgotPassword;->(Ljava/lang/String;)V invoke-virtual {v0, v1}, Lcom/discord/utilities/rest/RestAPI;->forgotPassword(Lcom/discord/restapi/RestAPIParams$ForgotPassword;)Lrx/Observable; move-result-object p1 const/4 v0, 0x0 const/4 v1, 0x1 const/4 v2, 0x0 invoke-static {p1, v0, v1, v2}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn$default(Lrx/Observable;ZILjava/lang/Object;)Lrx/Observable; move-result-object p1 return-object p1 .end method .method public final getAgeGateError()Lrx/Observable; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "()", "Lrx/Observable<", "Ljava/lang/String;", ">;" } .end annotation iget-object v0, p0, Lcom/discord/stores/StoreAuthentication;->ageGateError:Lrx/subjects/BehaviorSubject; invoke-virtual {v0}, Lrx/Observable;->q()Lrx/Observable; move-result-object v0 const-string v1, "ageGateError.distinctUntilChanged()" invoke-static {v0, v1}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V return-object v0 .end method .method public final getAuthToken$app_productionDiscordExternalRelease()Ljava/lang/String; .locals 1 iget-object v0, p0, Lcom/discord/stores/StoreAuthentication;->authToken:Ljava/lang/String; return-object v0 .end method .method public final getAuthedToken$app_productionDiscordExternalRelease()Lrx/Observable; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "()", "Lrx/Observable<", "Ljava/lang/String;", ">;" } .end annotation iget-object v0, p0, Lcom/discord/stores/StoreAuthentication;->tokenSubject:Lrx/subjects/SerializedSubject; invoke-virtual {v0}, Lrx/Observable;->q()Lrx/Observable; move-result-object v0 const-string v1, "tokenSubject.distinctUntilChanged()" invoke-static {v0, v1}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V return-object v0 .end method .method public final getEmail()Ljava/lang/String; .locals 1 iget-object v0, p0, Lcom/discord/stores/StoreAuthentication;->email:Ljava/lang/String; return-object v0 .end method .method public final getFingerPrint$app_productionDiscordExternalRelease()Lrx/Observable; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "()", "Lrx/Observable<", "Ljava/lang/String;", ">;" } .end annotation iget-object v0, p0, Lcom/discord/stores/StoreAuthentication;->fingerprintSubject:Lrx/subjects/SerializedSubject; invoke-virtual {v0}, Lrx/Observable;->q()Lrx/Observable; move-result-object v0 const-string v1, "fingerprintSubject.distinctUntilChanged()" invoke-static {v0, v1}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V return-object v0 .end method .method public final getFingerprint$app_productionDiscordExternalRelease()Ljava/lang/String; .locals 1 iget-object v0, p0, Lcom/discord/stores/StoreAuthentication;->fingerprint:Ljava/lang/String; return-object v0 .end method .method public final getIsAuthed$app_productionDiscordExternalRelease()Lrx/Observable; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "()", "Lrx/Observable<", "Ljava/lang/Boolean;", ">;" } .end annotation invoke-virtual {p0}, Lcom/discord/stores/StoreAuthentication;->getAuthedToken$app_productionDiscordExternalRelease()Lrx/Observable; move-result-object v0 sget-object v1, Lcom/discord/stores/StoreAuthentication$getIsAuthed$1;->INSTANCE:Lcom/discord/stores/StoreAuthentication$getIsAuthed$1; invoke-virtual {v0, v1}, Lrx/Observable;->E(Lt0/k/b;)Lrx/Observable; move-result-object v0 const-string v1, "getAuthedToken()\n .\u2026 -> authedToken != null }" invoke-static {v0, v1}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V return-object v0 .end method .method public final getOAuthUriObservable()Lrx/Observable; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "()", "Lrx/Observable<", "Landroid/net/Uri;", ">;" } .end annotation iget-object v0, p0, Lcom/discord/stores/StoreAuthentication;->oauthUriSubject:Lrx/subjects/SerializedSubject; invoke-virtual {v0}, Lrx/Observable;->q()Lrx/Observable; move-result-object v0 const-string v1, "oauthUriSubject.distinctUntilChanged()" invoke-static {v0, v1}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V return-object v0 .end method .method public final getPreLogoutSignal$app_productionDiscordExternalRelease()Lrx/Observable; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "()", "Lrx/Observable<", "Ljava/lang/Boolean;", ">;" } .end annotation iget-object v0, p0, Lcom/discord/stores/StoreAuthentication;->userInitiatedAuthEventSubject:Lrx/subjects/PublishSubject; sget-object v1, Lcom/discord/stores/StoreAuthentication$getPreLogoutSignal$1;->INSTANCE:Lcom/discord/stores/StoreAuthentication$getPreLogoutSignal$1; invoke-virtual {v0, v1}, Lrx/Observable;->w(Lt0/k/b;)Lrx/Observable; move-result-object v0 const-string/jumbo v1, "userInitiatedAuthEventSu\u2026LoggedIn -> !isLoggedIn }" invoke-static {v0, v1}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V return-object v0 .end method .method public final getShouldShowAgeGate()Lrx/Observable; .locals 7 .annotation system Ldalvik/annotation/Signature; value = { "()", "Lrx/Observable<", "Lcom/discord/stores/StoreNavigation$AgeGate;", ">;" } .end annotation iget-object v0, p0, Lcom/discord/stores/StoreAuthentication;->storeStream:Lcom/discord/stores/StoreStream; invoke-virtual {v0}, Lcom/discord/stores/StoreStream;->getUsers$app_productionDiscordExternalRelease()Lcom/discord/stores/StoreUser; move-result-object v0 const/4 v1, 0x1 invoke-virtual {v0, v1}, Lcom/discord/stores/StoreUser;->observeMe(Z)Lrx/Observable; move-result-object v0 iget-object v1, p0, Lcom/discord/stores/StoreAuthentication;->storeStream:Lcom/discord/stores/StoreStream; invoke-virtual {v1}, Lcom/discord/stores/StoreStream;->getAuthentication$app_productionDiscordExternalRelease()Lcom/discord/stores/StoreAuthentication; move-result-object v1 invoke-virtual {v1}, Lcom/discord/stores/StoreAuthentication;->getAgeGateError()Lrx/Observable; move-result-object v1 iget-object v2, p0, Lcom/discord/stores/StoreAuthentication;->storeStream:Lcom/discord/stores/StoreStream; invoke-virtual {v2}, Lcom/discord/stores/StoreStream;->getChannelsSelected$app_productionDiscordExternalRelease()Lcom/discord/stores/StoreChannelsSelected; move-result-object v2 invoke-virtual {v2}, Lcom/discord/stores/StoreChannelsSelected;->get()Lrx/Observable; move-result-object v2 iget-object v3, p0, Lcom/discord/stores/StoreAuthentication;->storeStream:Lcom/discord/stores/StoreStream; invoke-virtual {v3}, Lcom/discord/stores/StoreStream;->getExperiments$app_productionDiscordExternalRelease()Lcom/discord/stores/StoreExperiments; move-result-object v3 const-string v4, "2020-04_nsfw_channel_age_gate" const/4 v5, 0x0 const/4 v6, 0x2 invoke-static {v3, v4, v5, v6, v5}, Lcom/discord/stores/StoreExperiments;->getExperiment$default(Lcom/discord/stores/StoreExperiments;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lrx/Observable; move-result-object v3 sget-object v4, Lcom/discord/stores/StoreAuthentication$getShouldShowAgeGate$1;->INSTANCE:Lcom/discord/stores/StoreAuthentication$getShouldShowAgeGate$1; invoke-static {v0, v1, v2, v3, v4}, Lrx/Observable;->h(Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/functions/Func4;)Lrx/Observable; move-result-object v0 invoke-virtual {v0}, Lrx/Observable;->q()Lrx/Observable; move-result-object v0 const-string v1, "Observable.combineLatest\u2026 .distinctUntilChanged()" invoke-static {v0, v1}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V return-object v0 .end method .method public final handleAgeGateError(Ljava/lang/String;)V .locals 1 .annotation runtime Lcom/discord/stores/StoreThread; .end annotation iget-object v0, p0, Lcom/discord/stores/StoreAuthentication;->ageGateError:Lrx/subjects/BehaviorSubject; invoke-virtual {v0, p1}, Lrx/subjects/BehaviorSubject;->onNext(Ljava/lang/Object;)V return-void .end method .method public final handleAuthToken$app_productionDiscordExternalRelease(Ljava/lang/String;)V .locals 2 .annotation runtime Lcom/discord/stores/StoreThread; .end annotation iput-object p1, p0, Lcom/discord/stores/StoreAuthentication;->authToken:Ljava/lang/String; invoke-virtual {p0}, Lcom/discord/stores/Store;->getPrefs()Landroid/content/SharedPreferences; move-result-object v0 invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor; move-result-object v0 const-string v1, "STORE_AUTHED_TOKEN" invoke-interface {v0, v1, p1}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor; move-result-object v0 invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->apply()V if-nez p1, :cond_0 sget-object p1, Lcom/discord/utilities/persister/Persister;->Companion:Lcom/discord/utilities/persister/Persister$Companion; invoke-virtual {p1}, Lcom/discord/utilities/persister/Persister$Companion;->reset()V sget-object p1, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion; invoke-virtual {p1}, Lcom/discord/stores/StoreStream$Companion;->getUserSettings()Lcom/discord/stores/StoreUserSettings; move-result-object p1 invoke-virtual {p1}, Lcom/discord/stores/StoreUserSettings;->reset()V invoke-virtual {p0}, Lcom/discord/stores/Store;->getPrefs()Landroid/content/SharedPreferences; move-result-object p1 const/4 v0, 0x0 const-string v1, "CACHE_KEY_LAST_THEME" invoke-interface {p1, v1, v0}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; move-result-object p1 invoke-virtual {p0}, Lcom/discord/stores/Store;->getPrefs()Landroid/content/SharedPreferences; move-result-object v0 invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor; move-result-object v0 invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->clear()Landroid/content/SharedPreferences$Editor; move-result-object v0 invoke-interface {v0, v1, p1}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor; move-result-object p1 invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->apply()V :cond_0 return-void .end method .method public final handleLoginResult(Lcom/discord/models/domain/auth/ModelLoginResult;)V .locals 3 .annotation runtime Lcom/discord/stores/StoreThread; .end annotation const-string v0, "loginResult" invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const/4 v0, 0x0 const/4 v1, 0x1 invoke-virtual {p0, v0, v1}, Lcom/discord/stores/StoreAuthentication;->setFingerprint(Ljava/lang/String;Z)V invoke-virtual {p1}, Lcom/discord/models/domain/auth/ModelLoginResult;->getToken()Ljava/lang/String; move-result-object v2 invoke-virtual {p0, v2}, Lcom/discord/stores/StoreAuthentication;->setAuthed(Ljava/lang/String;)V invoke-virtual {p1}, Lcom/discord/models/domain/auth/ModelLoginResult;->getToken()Ljava/lang/String; move-result-object p1 if-eqz p1, :cond_0 invoke-virtual {p0, v0}, Lcom/discord/stores/StoreAuthentication;->setAgeGateError(Ljava/lang/String;)V :cond_0 iget-object p1, p0, Lcom/discord/stores/StoreAuthentication;->userInitiatedAuthEventSubject:Lrx/subjects/PublishSubject; sget-object v0, Ljava/lang/Boolean;->TRUE:Ljava/lang/Boolean; iget-object p1, p1, Lrx/subjects/PublishSubject;->e:Lrx/subjects/PublishSubject$b; invoke-virtual {p1, v0}, Lrx/subjects/PublishSubject$b;->onNext(Ljava/lang/Object;)V sget-object p1, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion; invoke-virtual {p1}, Lcom/discord/stores/StoreStream$Companion;->getNux()Lcom/discord/stores/StoreNux; move-result-object p1 invoke-virtual {p1, v1}, Lcom/discord/stores/StoreNux;->setFirstOpen(Z)V return-void .end method .method public final handlePreLogout$app_productionDiscordExternalRelease()V .locals 0 .annotation runtime Lcom/discord/stores/StoreThread; .end annotation invoke-direct {p0}, Lcom/discord/stores/StoreAuthentication;->resetIsConsentRequired()V return-void .end method .method public declared-synchronized init(Landroid/content/Context;)V .locals 10 .annotation runtime Lcom/discord/stores/StoreThread; .end annotation monitor-enter p0 :try_start_0 const-string v0, "context" invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V invoke-super {p0, p1}, Lcom/discord/stores/Store;->init(Landroid/content/Context;)V invoke-virtual {p0}, Lcom/discord/stores/Store;->getPrefsSessionDurable()Landroid/content/SharedPreferences; move-result-object v0 const-string v1, "STORE_AUTHED_FINGERPRINT" const/4 v2, 0x0 invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; move-result-object v0 if-eqz v0, :cond_0 const/4 v1, 0x0 invoke-virtual {p0, v0, v1}, Lcom/discord/stores/StoreAuthentication;->setFingerprint(Ljava/lang/String;Z)V :cond_0 invoke-virtual {p0}, Lcom/discord/stores/Store;->getPrefs()Landroid/content/SharedPreferences; move-result-object v0 const-string v1, "STORE_AUTHED_TOKEN" invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; move-result-object v0 iput-object v0, p0, Lcom/discord/stores/StoreAuthentication;->authToken:Ljava/lang/String; invoke-virtual {p0, v0}, Lcom/discord/stores/StoreAuthentication;->setAuthed(Ljava/lang/String;)V invoke-virtual {p0, v2}, Lcom/discord/stores/StoreAuthentication;->handleAgeGateError(Ljava/lang/String;)V invoke-virtual {p0}, Lcom/discord/stores/Store;->getPrefsSessionDurable()Landroid/content/SharedPreferences; move-result-object v0 const-string v1, "STORE_AUTHED_EMAIL" sget-object v2, Lcom/discord/stores/StoreAuthentication;->Companion:Lcom/discord/stores/StoreAuthentication$Companion; invoke-static {v2, p1}, Lcom/discord/stores/StoreAuthentication$Companion;->access$getDeviceEmail(Lcom/discord/stores/StoreAuthentication$Companion;Landroid/content/Context;)Ljava/lang/String; move-result-object v2 invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; move-result-object v0 invoke-direct {p0, v0}, Lcom/discord/stores/StoreAuthentication;->setEmail(Ljava/lang/String;)V iget-object v0, p0, Lcom/discord/stores/StoreAuthentication;->userInitiatedAuthEventSubject:Lrx/subjects/PublishSubject; invoke-virtual {v0}, Lrx/Observable;->q()Lrx/Observable; move-result-object v0 sget-object v1, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion; invoke-virtual {v1}, Lcom/discord/stores/StoreStream$Companion;->getUsers()Lcom/discord/stores/StoreUser; move-result-object v1 invoke-virtual {v1}, Lcom/discord/stores/StoreUser;->observeMeId()Lrx/Observable; move-result-object v1 sget-object v2, Lcom/discord/stores/StoreAuthentication$init$1;->INSTANCE:Lcom/discord/stores/StoreAuthentication$init$1; invoke-virtual {v1, v2}, Lrx/Observable;->w(Lt0/k/b;)Lrx/Observable; move-result-object v1 sget-object v2, Lcom/discord/stores/StoreAuthentication$init$2;->INSTANCE:Lcom/discord/stores/StoreAuthentication$init$2; invoke-static {v0, v1, v2}, Lrx/Observable;->j(Lrx/Observable;Lrx/Observable;Lrx/functions/Func2;)Lrx/Observable; move-result-object v0 const-string v1, "Observable.combineLatest\u2026 isLoggedIn to meUserId }" invoke-static {v0, v1}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V invoke-static {v0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable; move-result-object v0 invoke-static {v0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->ui(Lrx/Observable;)Lrx/Observable; move-result-object v1 invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class; move-result-object v2 const/4 v3, 0x0 const/4 v4, 0x0 const/4 v5, 0x0 const/4 v6, 0x0 new-instance v7, Lcom/discord/stores/StoreAuthentication$init$3; invoke-direct {v7, p1}, Lcom/discord/stores/StoreAuthentication$init$3;->(Landroid/content/Context;)V const/16 v8, 0x1e const/4 v9, 0x0 invoke-static/range {v1 .. v9}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->appSubscribe$default(Lrx/Observable;Ljava/lang/Class;Landroid/content/Context;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 monitor-exit p0 return-void :catchall_0 move-exception p1 monitor-exit p0 throw p1 .end method .method public final declared-synchronized isConsentRequired()Z .locals 1 monitor-enter p0 :try_start_0 iget-object v0, p0, Lcom/discord/stores/StoreAuthentication;->_isConsentRequired:Ljava/lang/Boolean; if-eqz v0, :cond_0 invoke-virtual {v0}, Ljava/lang/Boolean;->booleanValue()Z move-result v0 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 goto :goto_0 :cond_0 const/4 v0, 0x1 :goto_0 monitor-exit p0 return v0 :catchall_0 move-exception v0 monitor-exit p0 throw v0 .end method .method public final login(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)Lrx/Observable; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/lang/String;", "Ljava/lang/String;", "Ljava/lang/String;", "Z)", "Lrx/Observable<", "Lcom/discord/models/domain/auth/ModelLoginResult;", ">;" } .end annotation const-string v0, "email" invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const-string v0, "password" invoke-static {p2, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V invoke-direct {p0, p1}, Lcom/discord/stores/StoreAuthentication;->setEmail(Ljava/lang/String;)V invoke-direct {p0}, Lcom/discord/stores/StoreAuthentication;->getFingerprintSnapshotOrGenerate()Lrx/Observable; move-result-object v0 new-instance v1, Lcom/discord/stores/StoreAuthentication$login$1; invoke-direct {v1, p1, p2, p3, p4}, Lcom/discord/stores/StoreAuthentication$login$1;->(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)V invoke-virtual {v0, v1}, Lrx/Observable;->x(Lt0/k/b;)Lrx/Observable; move-result-object p1 new-instance p2, Lcom/discord/stores/StoreAuthentication$login$2; invoke-direct {p2, p0}, Lcom/discord/stores/StoreAuthentication$login$2;->(Lcom/discord/stores/StoreAuthentication;)V invoke-virtual {p1, p2}, Lrx/Observable;->t(Lrx/functions/Action1;)Lrx/Observable; move-result-object p1 const-string p2, "getFingerprintSnapshotOr\u2026lt)\n }\n }" invoke-static {p1, p2}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V return-object p1 .end method .method public final logout()V .locals 18 move-object/from16 v0, p0 iget-object v1, v0, Lcom/discord/stores/StoreAuthentication;->userInitiatedAuthEventSubject:Lrx/subjects/PublishSubject; sget-object v2, Ljava/lang/Boolean;->FALSE:Ljava/lang/Boolean; iget-object v1, v1, Lrx/subjects/PublishSubject;->e:Lrx/subjects/PublishSubject$b; invoke-virtual {v1, v2}, Lrx/subjects/PublishSubject$b;->onNext(Ljava/lang/Object;)V sget-object v1, Lcom/discord/utilities/rest/RestAPI;->Companion:Lcom/discord/utilities/rest/RestAPI$Companion; invoke-virtual {v1}, Lcom/discord/utilities/rest/RestAPI$Companion;->getApi()Lcom/discord/utilities/rest/RestAPI; move-result-object v1 new-instance v2, Lcom/discord/restapi/RestAPIParams$UserDevices; sget-object v3, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion; invoke-virtual {v3}, Lcom/discord/stores/StoreStream$Companion;->getNotifications()Lcom/discord/stores/StoreNotifications; move-result-object v3 invoke-virtual {v3}, Lcom/discord/stores/StoreNotifications;->getPushToken()Ljava/lang/String; move-result-object v3 invoke-direct {v2, v3}, Lcom/discord/restapi/RestAPIParams$UserDevices;->(Ljava/lang/String;)V invoke-virtual {v1, v2}, Lcom/discord/utilities/rest/RestAPI;->logout(Lcom/discord/restapi/RestAPIParams$UserDevices;)Lrx/Observable; move-result-object v1 const/4 v2, 0x0 const/4 v3, 0x1 const/4 v4, 0x0 invoke-static {v1, v2, v3, v4}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn$default(Lrx/Observable;ZILjava/lang/Object;)Lrx/Observable; move-result-object v1 new-instance v2, Lcom/discord/stores/StoreAuthentication$logout$1; invoke-direct {v2, v0}, Lcom/discord/stores/StoreAuthentication$logout$1;->(Lcom/discord/stores/StoreAuthentication;)V invoke-virtual {v1, v2}, Lrx/Observable;->x(Lt0/k/b;)Lrx/Observable; move-result-object v3 const-string v1, "RestAPI\n .api\n \u2026intSnapshotOrGenerate() }" invoke-static {v3, v1}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V const-wide/16 v4, 0x0 const/4 v6, 0x0 const/4 v7, 0x3 const/4 v8, 0x0 invoke-static/range {v3 .. v8}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->takeSingleUntilTimeout$default(Lrx/Observable;JZILjava/lang/Object;)Lrx/Observable; move-result-object v9 const/4 v10, 0x0 const/4 v12, 0x0 new-instance v13, Lcom/discord/stores/StoreAuthentication$logout$2; invoke-direct {v13, v0}, Lcom/discord/stores/StoreAuthentication$logout$2;->(Lcom/discord/stores/StoreAuthentication;)V new-instance v14, Lcom/discord/stores/StoreAuthentication$logout$3; invoke-direct {v14, v0}, Lcom/discord/stores/StoreAuthentication$logout$3;->(Lcom/discord/stores/StoreAuthentication;)V const/4 v15, 0x0 const/16 v16, 0x25 const/16 v17, 0x0 const-string v11, "logout" invoke-static/range {v9 .. v17}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->appSubscribe$default(Lrx/Observable;Landroid/content/Context;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V return-void .end method .method public final register(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/String;)Lrx/Observable; .locals 11 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/lang/String;", "Ljava/lang/String;", "Ljava/lang/String;", "Ljava/lang/String;", "Z", "Ljava/lang/String;", ")", "Lrx/Observable<", "Lcom/discord/models/domain/ModelUser$Token;", ">;" } .end annotation move-object v3, p2 const-string/jumbo v0, "username" move-object v2, p1 invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const-string v0, "email" invoke-static {p2, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const-string v0, "password" move-object v4, p3 invoke-static {p3, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V move-object v8, p0 invoke-direct {p0, p2}, Lcom/discord/stores/StoreAuthentication;->setEmail(Ljava/lang/String;)V invoke-direct {p0}, Lcom/discord/stores/StoreAuthentication;->getFingerprintSnapshotOrGenerate()Lrx/Observable; move-result-object v9 new-instance v10, Lcom/discord/stores/StoreAuthentication$register$1; move-object v0, v10 move-object v1, p0 move-object v5, p4 move/from16 v6, p5 move-object/from16 v7, p6 invoke-direct/range {v0 .. v7}, Lcom/discord/stores/StoreAuthentication$register$1;->(Lcom/discord/stores/StoreAuthentication;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/String;)V invoke-virtual {v9, v10}, Lrx/Observable;->x(Lt0/k/b;)Lrx/Observable; move-result-object v0 const-string v1, "getFingerprintSnapshotOr\u2026 }\n }" invoke-static {v0, v1}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V return-object v0 .end method .method public final declared-synchronized requestConsentRequired()V .locals 13 monitor-enter p0 :try_start_0 iget-object v0, p0, Lcom/discord/stores/StoreAuthentication;->_isConsentRequired:Ljava/lang/Boolean; :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 if-eqz v0, :cond_0 monitor-exit p0 return-void :cond_0 :try_start_1 invoke-direct {p0}, Lcom/discord/stores/StoreAuthentication;->resetIsConsentRequired()V sget-object v0, Lcom/discord/utilities/rest/RestAPI;->Companion:Lcom/discord/utilities/rest/RestAPI$Companion; invoke-virtual {v0}, Lcom/discord/utilities/rest/RestAPI$Companion;->getApi()Lcom/discord/utilities/rest/RestAPI; move-result-object v0 invoke-virtual {v0}, Lcom/discord/utilities/rest/RestAPI;->getConsentRequired()Lrx/Observable; move-result-object v0 const/4 v1, 0x0 const/4 v2, 0x1 const/4 v3, 0x0 invoke-static {v0, v1, v2, v3}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn$default(Lrx/Observable;ZILjava/lang/Object;)Lrx/Observable; move-result-object v4 invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class; move-result-object v5 const/4 v6, 0x0 new-instance v10, Lcom/discord/stores/StoreAuthentication$requestConsentRequired$1; invoke-direct {v10, p0}, Lcom/discord/stores/StoreAuthentication$requestConsentRequired$1;->(Lcom/discord/stores/StoreAuthentication;)V new-instance v8, Lcom/discord/stores/StoreAuthentication$requestConsentRequired$2; invoke-direct {v8, p0}, Lcom/discord/stores/StoreAuthentication$requestConsentRequired$2;->(Lcom/discord/stores/StoreAuthentication;)V const/4 v9, 0x0 new-instance v7, Lcom/discord/stores/StoreAuthentication$requestConsentRequired$3; invoke-direct {v7, p0}, Lcom/discord/stores/StoreAuthentication$requestConsentRequired$3;->(Lcom/discord/stores/StoreAuthentication;)V const/16 v11, 0x12 const/4 v12, 0x0 invoke-static/range {v4 .. v12}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->appSubscribe$default(Lrx/Observable;Ljava/lang/Class;Landroid/content/Context;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 monitor-exit p0 return-void :catchall_0 move-exception v0 monitor-exit p0 throw v0 .end method .method public final setAgeGateError(Ljava/lang/String;)V .locals 2 iget-object v0, p0, Lcom/discord/stores/StoreAuthentication;->dispatcher:Lcom/discord/stores/Dispatcher; new-instance v1, Lcom/discord/stores/StoreAuthentication$setAgeGateError$1; invoke-direct {v1, p0, p1}, Lcom/discord/stores/StoreAuthentication$setAgeGateError$1;->(Lcom/discord/stores/StoreAuthentication;Ljava/lang/String;)V invoke-virtual {v0, v1}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V return-void .end method .method public final setAuthed(Ljava/lang/String;)V .locals 1 iget-object v0, p0, Lcom/discord/stores/StoreAuthentication;->tokenSubject:Lrx/subjects/SerializedSubject; iget-object v0, v0, Lrx/subjects/SerializedSubject;->e:Lt0/n/c; invoke-virtual {v0, p1}, Lt0/n/c;->onNext(Ljava/lang/Object;)V return-void .end method .method public final declared-synchronized setFingerprint(Ljava/lang/String;Z)V .locals 1 monitor-enter p0 if-nez p2, :cond_0 :try_start_0 iget-object p2, p0, Lcom/discord/stores/StoreAuthentication;->fingerprint:Ljava/lang/String; if-nez p2, :cond_1 :cond_0 invoke-virtual {p0}, Lcom/discord/stores/Store;->getPrefsSessionDurable()Landroid/content/SharedPreferences; move-result-object p2 invoke-interface {p2}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor; move-result-object p2 const-string v0, "STORE_AUTHED_FINGERPRINT" invoke-interface {p2, v0, p1}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor; move-result-object p2 invoke-interface {p2}, Landroid/content/SharedPreferences$Editor;->apply()V iput-object p1, p0, Lcom/discord/stores/StoreAuthentication;->fingerprint:Ljava/lang/String; iget-object p2, p0, Lcom/discord/stores/StoreAuthentication;->fingerprintSubject:Lrx/subjects/SerializedSubject; iget-object p2, p2, Lrx/subjects/SerializedSubject;->e:Lt0/n/c; invoke-virtual {p2, p1}, Lt0/n/c;->onNext(Ljava/lang/Object;)V if-eqz p1, :cond_1 invoke-static {}, Lcom/google/firebase/crashlytics/FirebaseCrashlytics;->getInstance()Lcom/google/firebase/crashlytics/FirebaseCrashlytics; move-result-object p2 const-string v0, "fingerprint" invoke-virtual {p2, v0, p1}, Lcom/google/firebase/crashlytics/FirebaseCrashlytics;->setCustomKey(Ljava/lang/String;Ljava/lang/String;)V :cond_1 iget-object p2, p0, Lcom/discord/stores/StoreAuthentication;->fingerprint:Ljava/lang/String; if-eqz p2, :cond_2 iget-object p2, p0, Lcom/discord/stores/StoreAuthentication;->fingerprint:Ljava/lang/String; invoke-static {p2, p1}, Lk0/n/c/i;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z move-result p2 xor-int/lit8 p2, p2, 0x1 if-eqz p2, :cond_2 if-eqz p1, :cond_2 iget-object p2, p0, Lcom/discord/stores/StoreAuthentication;->fingerprint:Ljava/lang/String; invoke-static {p2}, Lk0/n/c/i;->checkNotNull(Ljava/lang/Object;)V invoke-static {p2, p1}, Lcom/discord/utilities/analytics/AnalyticsTracker;->externalFingerprintDropped(Ljava/lang/String;Ljava/lang/String;)V :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 :cond_2 monitor-exit p0 return-void :catchall_0 move-exception p1 monitor-exit p0 throw p1 .end method .method public final setOAuthUriSubject(Landroid/net/Uri;)V .locals 1 const-string/jumbo v0, "uri" invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V iget-object v0, p0, Lcom/discord/stores/StoreAuthentication;->oauthUriSubject:Lrx/subjects/SerializedSubject; iget-object v0, v0, Lrx/subjects/SerializedSubject;->e:Lt0/n/c; invoke-virtual {v0, p1}, Lt0/n/c;->onNext(Ljava/lang/Object;)V return-void .end method .method public final startHandOffProcess(Ljava/lang/String;)Lrx/Observable; .locals 3 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/lang/String;", ")", "Lrx/Observable<", "Ljava/lang/String;", ">;" } .end annotation const-string v0, "handOffKey" invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V sget-object v0, Lcom/discord/utilities/rest/RestAPI;->Companion:Lcom/discord/utilities/rest/RestAPI$Companion; invoke-virtual {v0}, Lcom/discord/utilities/rest/RestAPI$Companion;->getApi()Lcom/discord/utilities/rest/RestAPI; move-result-object v0 const-string v1, "key" invoke-static {v1, p1}, Ljava/util/Collections;->singletonMap(Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map; move-result-object p1 const-string v1, "Collections.singletonMap(\"key\", handOffKey)" invoke-static {p1, v1}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V invoke-virtual {v0, p1}, Lcom/discord/utilities/rest/RestAPI;->postAuthHandoff(Ljava/util/Map;)Lrx/Observable; move-result-object p1 const/4 v0, 0x0 const/4 v1, 0x1 const/4 v2, 0x0 invoke-static {p1, v0, v1, v2}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn$default(Lrx/Observable;ZILjava/lang/Object;)Lrx/Observable; move-result-object p1 sget-object v0, Lcom/discord/stores/StoreAuthentication$startHandOffProcess$1;->INSTANCE:Lcom/discord/stores/StoreAuthentication$startHandOffProcess$1; invoke-virtual {p1, v0}, Lrx/Observable;->E(Lt0/k/b;)Lrx/Observable; move-result-object p1 const-string v0, "RestAPI\n .api\n \u2026 .map { it.handoffToken }" invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V return-object p1 .end method