Add initial support for Firebase Auth

This commit is contained in:
Marvin W 2020-09-27 11:40:22 +02:00
parent 7d54c4d4cb
commit c3bfb63f27
No known key found for this signature in database
GPG Key ID: 072E9235DB996F2A
116 changed files with 2687 additions and 82 deletions

View File

@ -25,6 +25,7 @@ buildscript {
ext.supportLibraryVersion = '28.0.0' ext.supportLibraryVersion = '28.0.0'
ext.slf4jVersion = '1.7.25' ext.slf4jVersion = '1.7.25'
ext.volleyVersion = '1.1.1'
ext.wireVersion = '3.2.2' ext.wireVersion = '3.2.2'
ext.androidBuildGradleVersion = '3.6.3' ext.androidBuildGradleVersion = '3.6.3'

View File

@ -0,0 +1,26 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
apply plugin: 'com.android.library'
android {
compileSdkVersion androidCompileSdk
buildToolsVersion "$androidBuildVersionTools"
defaultConfig {
versionName version
minSdkVersion androidMinSdk
targetSdkVersion androidTargetSdk
}
compileOptions {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
}
dependencies {
api project(':play-services-basement')
}

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ SPDX-FileCopyrightText: 2020, microG Project Team
~ SPDX-License-Identifier: Apache-2.0
-->
<manifest package="org.microg.gms.firebase.auth.api" />

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth;
parcelable ActionCodeSettings;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth;
parcelable EmailAuthCredential;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth;
parcelable PhoneAuthCredential;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth;
parcelable UserProfileChangeRequest;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable ApplyActionCodeAidlRequest;

View File

@ -1,5 +1,3 @@
package com.google.firebase.auth.api.internal; package com.google.firebase.auth.api.internal;
interface IFirebaseAuthService { parcelable ChangeEmailAidlRequest;
}

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable ChangePasswordAidlRequest;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable CheckActionCodeAidlRequest;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable ConfirmPasswordResetAidlRequest;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable CreateAuthUriResponse;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable CreateUserWithEmailAndPasswordAidlRequest;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable DeleteAidlRequest;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable FinalizeMfaEnrollmentAidlRequest;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable FinalizeMfaSignInAidlRequest;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable GetAccessTokenAidlRequest;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable GetAccountInfoUser;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable GetProvidersForEmailAidlRequest;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable GetTokenResponse;

View File

@ -0,0 +1,22 @@
package com.google.firebase.auth.api.internal;
import com.google.android.gms.common.api.Status;
import com.google.firebase.auth.PhoneAuthCredential;
import com.google.firebase.auth.api.internal.CreateAuthUriResponse;
import com.google.firebase.auth.api.internal.GetAccountInfoUser;
import com.google.firebase.auth.api.internal.GetTokenResponse;
import com.google.firebase.auth.api.internal.ResetPasswordResponse;
interface IFirebaseAuthCallbacks {
void onGetTokenResponse(in GetTokenResponse response) = 0;
void onGetTokenResponseAndUser(in GetTokenResponse response, in GetAccountInfoUser user) = 1;
void onCreateAuthUriResponse(in CreateAuthUriResponse response) = 2;
void onResetPasswordResponse(in ResetPasswordResponse response) = 3;
void onFailure(in Status status) = 4;
void onDeleteAccountResponse() = 5;
void onEmailVerificationResponse() = 6;
void onSendVerificationCodeResponse(String sessionInfo) = 8;
void onVerificationCompletedResponse(in PhoneAuthCredential credential) = 9;
void onVerificationAutoTimeOut(String sessionInfo) = 10;
}

View File

@ -0,0 +1,108 @@
package com.google.firebase.auth.api.internal;
import com.google.firebase.auth.api.internal.ApplyActionCodeAidlRequest;
import com.google.firebase.auth.api.internal.ChangeEmailAidlRequest;
import com.google.firebase.auth.api.internal.ChangePasswordAidlRequest;
import com.google.firebase.auth.api.internal.CheckActionCodeAidlRequest;
import com.google.firebase.auth.api.internal.ConfirmPasswordResetAidlRequest;
import com.google.firebase.auth.api.internal.CreateUserWithEmailAndPasswordAidlRequest;
import com.google.firebase.auth.api.internal.DeleteAidlRequest;
import com.google.firebase.auth.api.internal.FinalizeMfaEnrollmentAidlRequest;
import com.google.firebase.auth.api.internal.FinalizeMfaSignInAidlRequest;
import com.google.firebase.auth.api.internal.GetAccessTokenAidlRequest;
import com.google.firebase.auth.api.internal.GetProvidersForEmailAidlRequest;
import com.google.firebase.auth.api.internal.IFirebaseAuthCallbacks;
import com.google.firebase.auth.api.internal.LinkEmailAuthCredentialAidlRequest;
import com.google.firebase.auth.api.internal.LinkFederatedCredentialAidlRequest;
import com.google.firebase.auth.api.internal.LinkPhoneAuthCredentialAidlRequest;
import com.google.firebase.auth.api.internal.ReloadAidlRequest;
import com.google.firebase.auth.api.internal.SendEmailVerificationWithSettingsAidlRequest;
import com.google.firebase.auth.api.internal.SendGetOobConfirmationCodeEmailAidlRequest;
import com.google.firebase.auth.api.internal.SendVerificationCodeAidlRequest;
import com.google.firebase.auth.api.internal.SendVerificationCodeRequest;
import com.google.firebase.auth.api.internal.SetFirebaseUiVersionAidlRequest;
import com.google.firebase.auth.api.internal.SignInAnonymouslyAidlRequest;
import com.google.firebase.auth.api.internal.SignInWithCredentialAidlRequest;
import com.google.firebase.auth.api.internal.SignInWithCustomTokenAidlRequest;
import com.google.firebase.auth.api.internal.SignInWithEmailAndPasswordAidlRequest;
import com.google.firebase.auth.api.internal.SignInWithEmailLinkAidlRequest;
import com.google.firebase.auth.api.internal.SignInWithPhoneNumberAidlRequest;
import com.google.firebase.auth.api.internal.StartMfaPhoneNumberEnrollmentAidlRequest;
import com.google.firebase.auth.api.internal.StartMfaPhoneNumberSignInAidlRequest;
import com.google.firebase.auth.api.internal.UnenrollMfaAidlRequest;
import com.google.firebase.auth.api.internal.UnlinkEmailCredentialAidlRequest;
import com.google.firebase.auth.api.internal.UnlinkFederatedCredentialAidlRequest;
import com.google.firebase.auth.api.internal.UpdateProfileAidlRequest;
import com.google.firebase.auth.api.internal.VerifyAssertionRequest;
import com.google.firebase.auth.api.internal.VerifyBeforeUpdateEmailAidlRequest;
import com.google.firebase.auth.ActionCodeSettings;
import com.google.firebase.auth.EmailAuthCredential;
import com.google.firebase.auth.PhoneAuthCredential;
import com.google.firebase.auth.UserProfileChangeRequest;
interface IFirebaseAuthService {
void getAccessTokenCompat(String refreshToken, IFirebaseAuthCallbacks callbacks) = 0;
void signInWithCustomTokenCompat(String token, IFirebaseAuthCallbacks callbacks) = 1;
void signInWithCredentialCompat(in VerifyAssertionRequest verifyAssertionRequest, IFirebaseAuthCallbacks callbacks) = 2;
void updateProfileCompat(String cachedState, in UserProfileChangeRequest userProfileChangeRequest, IFirebaseAuthCallbacks callbacks) = 3;
void changeEmailCompat(String cachedState, String email, IFirebaseAuthCallbacks callbacks) = 4;
void changePasswordCompat(String cachedState, String password, IFirebaseAuthCallbacks callbacks) = 5;
void createUserWithEmailAndPasswordCompat(String email, String password, IFirebaseAuthCallbacks callbacks) = 6;
void signInWithEmailAndPasswordCompat(String email, String password, IFirebaseAuthCallbacks callbacks) = 7;
void getProvidersForEmailCompat(String email, IFirebaseAuthCallbacks callbacks) = 8;
void linkEmailAuthCredentialCompat(String email, String password, String cachedState, IFirebaseAuthCallbacks callbacks) = 10;
void linkFederatedCredentialCompat(String cachedState, in VerifyAssertionRequest verifyAssertionRequest, IFirebaseAuthCallbacks callbacks) = 11;
void unlinkEmailCredentialCompat(String cachedState, IFirebaseAuthCallbacks callbacks) = 12;
void unlinkFederatedCredentialCompat(String provider, String cachedState, IFirebaseAuthCallbacks callbacks) = 13;
void reloadCompat(String cachedState, IFirebaseAuthCallbacks callbacks) = 14;
void signInAnonymouslyCompat(IFirebaseAuthCallbacks callbacks) = 15;
void deleteCompat(String cachedState, IFirebaseAuthCallbacks callbacks) = 16;
void checkActionCodeCompat(String code, IFirebaseAuthCallbacks callbacks) = 18;
void applyActionCodeCompat(String code, IFirebaseAuthCallbacks callbacks) = 19;
void confirmPasswordResetCompat(String code, String newPassword, IFirebaseAuthCallbacks callbacks) = 20;
void sendVerificationCodeCompat(in SendVerificationCodeRequest request, IFirebaseAuthCallbacks callbacks) = 21;
void signInWithPhoneNumberCompat(in PhoneAuthCredential credential, IFirebaseAuthCallbacks callbacks) = 22;
void linkPhoneAuthCredentialCompat(String cachedState, in PhoneAuthCredential credential, IFirebaseAuthCallbacks callbacks) = 23;
void sendEmailVerificationCompat(String token, in ActionCodeSettings actionCodeSettings, IFirebaseAuthCallbacks callbacks) = 25;
void setFirebaseUIVersionCompat(String firebaseUiVersion, IFirebaseAuthCallbacks callbacks) = 26;
void sendGetOobConfirmationCodeEmailCompat(String email, in ActionCodeSettings actionCodeSettings, IFirebaseAuthCallbacks callbacks) = 27;
void signInWithEmailLinkCompat(in EmailAuthCredential credential, IFirebaseAuthCallbacks callbacks) = 28;
void getAccessToken(in GetAccessTokenAidlRequest request, IFirebaseAuthCallbacks callbacks) = 100;
void signInWithCustomToken(in SignInWithCustomTokenAidlRequest request, IFirebaseAuthCallbacks callbacks) = 101;
void signInWithCredential(in SignInWithCredentialAidlRequest request, IFirebaseAuthCallbacks callbacks) = 102;
void updateProfile(in UpdateProfileAidlRequest request, IFirebaseAuthCallbacks callbacks) = 103;
void changeEmail(in ChangeEmailAidlRequest request, IFirebaseAuthCallbacks callbacks) = 104;
void changePassword(in ChangePasswordAidlRequest request, IFirebaseAuthCallbacks callbacks) = 105;
void createUserWithEmailAndPassword(in CreateUserWithEmailAndPasswordAidlRequest request, IFirebaseAuthCallbacks callbacks) = 106;
void signInWithEmailAndPassword(in SignInWithEmailAndPasswordAidlRequest request, IFirebaseAuthCallbacks callbacks) = 107;
void getProvidersForEmail(in GetProvidersForEmailAidlRequest request, IFirebaseAuthCallbacks callbacks) = 108;
void linkEmailAuthCredential(in LinkEmailAuthCredentialAidlRequest request, IFirebaseAuthCallbacks callbacks) = 110;
void linkFederatedCredential(in LinkFederatedCredentialAidlRequest request, IFirebaseAuthCallbacks callbacks) = 111;
void unlinkEmailCredential(in UnlinkEmailCredentialAidlRequest request, IFirebaseAuthCallbacks callbacks) = 112;
void unlinkFederatedCredential(in UnlinkFederatedCredentialAidlRequest request, IFirebaseAuthCallbacks callbacks) = 113;
void reload(in ReloadAidlRequest request, IFirebaseAuthCallbacks callbacks) = 114;
void signInAnonymously(in SignInAnonymouslyAidlRequest request, IFirebaseAuthCallbacks callbacks) = 115;
void delete(in DeleteAidlRequest request, IFirebaseAuthCallbacks callbacks) = 116;
void checkActionCode(in CheckActionCodeAidlRequest request, IFirebaseAuthCallbacks callbacks) = 118;
void applyActionCode(in ApplyActionCodeAidlRequest request, IFirebaseAuthCallbacks callbacks) = 119;
void confirmPasswordReset(in ConfirmPasswordResetAidlRequest request, IFirebaseAuthCallbacks callbacks) = 120;
void sendVerificationCode(in SendVerificationCodeAidlRequest request, IFirebaseAuthCallbacks callbacks) = 121;
void signInWithPhoneNumber(in SignInWithPhoneNumberAidlRequest request, IFirebaseAuthCallbacks callbacks) = 122;
void linkPhoneAuthCredential(in LinkPhoneAuthCredentialAidlRequest request, IFirebaseAuthCallbacks callbacks) = 123;
void sendEmailVerification(in SendEmailVerificationWithSettingsAidlRequest request, IFirebaseAuthCallbacks callbacks) = 125;
void setFirebaseUiVersion(in SetFirebaseUiVersionAidlRequest request, IFirebaseAuthCallbacks callbacks) = 126;
void sendGetOobConfirmationCodeEmail(in SendGetOobConfirmationCodeEmailAidlRequest request, IFirebaseAuthCallbacks callbacks) = 127;
void signInWithEmailLink(in SignInWithEmailLinkAidlRequest request, IFirebaseAuthCallbacks callbacks) = 128;
void startMfaEnrollmentWithPhoneNumber(in StartMfaPhoneNumberEnrollmentAidlRequest request, IFirebaseAuthCallbacks callbacks) = 129;
void unenrollMfa(in UnenrollMfaAidlRequest request, IFirebaseAuthCallbacks callbacks) = 130;
void finalizeMfaEnrollment(in FinalizeMfaEnrollmentAidlRequest request, IFirebaseAuthCallbacks callbacks) = 131;
void startMfaSignInWithPhoneNumber(in StartMfaPhoneNumberSignInAidlRequest request, IFirebaseAuthCallbacks callbacks) = 132;
void finalizeMfaSignIn(in FinalizeMfaSignInAidlRequest request, IFirebaseAuthCallbacks callbacks) = 133;
void verifyBeforeUpdateEmail(in VerifyBeforeUpdateEmailAidlRequest request, IFirebaseAuthCallbacks callbacks) = 134;
}

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable LinkEmailAuthCredentialAidlRequest;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable LinkFederatedCredentialAidlRequest;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable LinkPhoneAuthCredentialAidlRequest;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable ReloadAidlRequest;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable ResetPasswordResponse;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable SendEmailVerificationWithSettingsAidlRequest;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable SendGetOobConfirmationCodeEmailAidlRequest;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable SendVerificationCodeAidlRequest;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable SendVerificationCodeRequest;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable SetFirebaseUiVersionAidlRequest;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable SignInAnonymouslyAidlRequest;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable SignInWithCredentialAidlRequest;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable SignInWithCustomTokenAidlRequest;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable SignInWithEmailAndPasswordAidlRequest;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable SignInWithEmailLinkAidlRequest;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable SignInWithPhoneNumberAidlRequest;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable StartMfaPhoneNumberEnrollmentAidlRequest;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable StartMfaPhoneNumberSignInAidlRequest;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable StringList;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable UnenrollMfaAidlRequest;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable UnlinkEmailCredentialAidlRequest;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable UnlinkFederatedCredentialAidlRequest;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable UpdateProfileAidlRequest;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable VerifyAssertionRequest;

View File

@ -0,0 +1,3 @@
package com.google.firebase.auth.api.internal;
parcelable VerifyBeforeUpdateEmailAidlRequest;

View File

@ -0,0 +1,182 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
* Notice: Portions of this file are reproduced from work created and shared by Google and used
* according to terms described in the Creative Commons 4.0 Attribution License.
* See https://developers.google.com/readme/policies for details.
*/
package com.google.firebase.auth;
import org.microg.gms.common.PublicApi;
import org.microg.safeparcel.AutoSafeParcelable;
/**
* Structure that contains the required continue/state URL with optional Android and iOS bundle identifiers.
* The stateUrl used to initialize this class is the link/deep link/fallback url used while constructing the Firebase dynamic link.
*/
@PublicApi
public class ActionCodeSettings extends AutoSafeParcelable {
@Field(1)
@PublicApi(exclude = true)
public String url;
@Field(2)
@PublicApi(exclude = true)
public String iOSBundle;
@Field(3)
@PublicApi(exclude = true)
public String iOSAppStoreId;
@Field(4)
@PublicApi(exclude = true)
public String androidPackageName;
@Field(5)
@PublicApi(exclude = true)
public boolean androidInstallApp;
@Field(6)
@PublicApi(exclude = true)
public String androidMinimumVersion;
@Field(7)
@PublicApi(exclude = true)
public boolean handleCodeInApp;
@Field(8)
@PublicApi(exclude = true)
public String localeHeader;
@Field(9)
@PublicApi(exclude = true)
public int requestType;
@Field(10)
@PublicApi(exclude = true)
public String dynamicLinkDomain;
private ActionCodeSettings() {
}
/**
* @return whether the oob code should be handled by the app. See {@link Builder#setHandleCodeInApp(boolean)}
*/
public boolean canHandleCodeInApp() {
return handleCodeInApp;
}
/**
* @return the preference for whether to attempt to install the app if it is not present. See {@link Builder#setAndroidPackageName(String, boolean, String)}
*/
public boolean getAndroidInstallApp() {
return androidInstallApp;
}
/**
* @return the minimum Android app version. See {@link Builder#setAndroidPackageName(String, boolean, String)}
*/
public String getAndroidMinimumVersion() {
return androidMinimumVersion;
}
/**
* @return the Android Package Name. See {@link Builder#setAndroidPackageName(String, boolean, String)}
*/
public String getAndroidPackageName() {
return androidPackageName;
}
/**
* @return the iOS Bundle. See {@link Builder#setIOSBundleId(String)}
*/
public String getIOSBundle() {
return iOSBundle;
}
/**
* @return the URL. See {@link Builder#setUrl(String)}
*/
public String getUrl() {
return url;
}
/**
* @return a new instance of {@link ActionCodeSettings.Builder}.
*/
public static Builder newBuilder() {
return new Builder();
}
/**
* A Builder class for {@link ActionCodeSettings}. Get an instance of this Builder using {@link #newBuilder()}.
*/
public static class Builder {
private String url;
private String iOSBundleId;
private String androidPackageName;
private boolean androidInstallApp;
private String androidMinimumVersion;
private boolean canHandleCodeInApp;
private String dynamicLinkDomain;
public ActionCodeSettings build() {
ActionCodeSettings settings = new ActionCodeSettings();
settings.url = url;
settings.iOSBundle = iOSBundleId;
settings.androidPackageName = androidPackageName;
settings.androidInstallApp = androidInstallApp;
settings.handleCodeInApp = canHandleCodeInApp;
settings.dynamicLinkDomain = dynamicLinkDomain;
return settings;
}
/**
* Sets the Android package name and returns the current builder instance.
* If {@code installIfNotAvailable} is set to true and the link is opened on an android device, it will try to install the app if not already available.
* Otherwise the web URL is used.
* <p>
* A minimum version string is also available. If the installed app is an older version, the user is taken to the Play Store to upgrade the app.
*/
public Builder setAndroidPackageName(String androidPackageName, boolean installIfNotAvailable, String minimumVersion) {
this.androidPackageName = androidPackageName;
this.androidInstallApp = installIfNotAvailable;
this.androidMinimumVersion = minimumVersion;
return this;
}
/**
* Sets the optional FDL domain, overriding the default FDL domain that would be used.
* Must be one of the 5 domains configured in the Firebase console.
*/
public Builder setDynamicLinkDomain(String dynamicLinkDomain) {
this.dynamicLinkDomain = dynamicLinkDomain;
return this;
}
/**
* The default is false. When set to true, the action code link will be sent as a universal link and will be open by the app if installed.
* In the false case, the code will be sent to the web widget first and then on continue will redirect to the app if installed.
*/
public Builder setHandleCodeInApp(boolean status) {
this.canHandleCodeInApp = status;
return this;
}
/**
* To be used if the email link that is sent might be opened on an iOS device.
* <p>
* Sets the iOS bundle Id and returns the current {@link ActionCodeSettings.Builder} instance.
*/
public Builder setIOSBundleId(String iOSBundleId) {
this.iOSBundleId = iOSBundleId;
return this;
}
/**
* Sets the URL, which has different meanings in different contexts. For email actions, this is the state/continue URL.
* When the app is not installed, this is the web continue URL with any developer provided state appended (the continueURL query parameter).
* When the app is installed, this is contained in the Firebase dynamic link payload.
* In the case where the code is sent directly to the app and the app is installed, this is the continueURL query parameter in the dynamic link payload.
* Otherwise, when the code is handled by the widget itself, it is the payload itself.
*/
public Builder setUrl(String url) {
this.url = url;
return this;
}
}
public static final Creator<ActionCodeSettings> CREATOR = new AutoCreator<>(ActionCodeSettings.class);
}

View File

@ -0,0 +1,28 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
* Notice: Portions of this file are reproduced from work created and shared by Google and used
* according to terms described in the Creative Commons 4.0 Attribution License.
* See https://developers.google.com/readme/policies for details.
*/
package com.google.firebase.auth;
import org.microg.gms.common.PublicApi;
import org.microg.safeparcel.AutoSafeParcelable;
/**
* Represents a credential that the Firebase Authentication server can use to authenticate a user.
*/
@PublicApi
public abstract class AuthCredential extends AutoSafeParcelable {
/**
* Returns the unique string identifier for the provider type with which the credential is associated.
*/
public abstract String getProvider();
/**
* Returns the unique string identifier for the sign in method with which the credential is associated. Should match that returned by {@link FirebaseAuth#fetchSignInMethodsForEmail(String)} after this user has signed in with this type of credential.
*/
public abstract String getSignInMethod();
}

View File

@ -0,0 +1,66 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
* Notice: Portions of this file are reproduced from work created and shared by Google and used
* according to terms described in the Creative Commons 4.0 Attribution License.
* See https://developers.google.com/readme/policies for details.
*/
package com.google.firebase.auth;
import com.google.firebase.auth.api.internal.VerifyAssertionRequest;
import org.microg.gms.common.PublicApi;
@PublicApi
public class DefaultOAuthCredential extends OAuthCredential {
@Field(1)
@PublicApi(exclude = true)
public String provider;
@Field(2)
@PublicApi(exclude = true)
public String idToken;
@Field(3)
@PublicApi(exclude = true)
public String accessToken;
@Field(4)
@PublicApi(exclude = true)
public VerifyAssertionRequest webSignInToken;
@Field(5)
@PublicApi(exclude = true)
public String pendingToken;
@Field(6)
@PublicApi(exclude = true)
public String secret;
@Field(7)
@PublicApi(exclude = true)
public String rawNonce;
@Override
public String getAccessToken() {
return accessToken;
}
@Override
public String getIdToken() {
return idToken;
}
@Override
public String getSecret() {
return secret;
}
@Override
public String getProvider() {
return provider;
}
@Override
public String getSignInMethod() {
return provider;
}
public static final Creator<DefaultOAuthCredential> CREATOR = new AutoCreator<>(DefaultOAuthCredential.class);
}

View File

@ -0,0 +1,54 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
* Notice: Portions of this file are reproduced from work created and shared by Google and used
* according to terms described in the Creative Commons 4.0 Attribution License.
* See https://developers.google.com/readme/policies for details.
*/
package com.google.firebase.auth;
import org.microg.gms.common.PublicApi;
/**
* Wraps an email and password tuple for authentication purposes.
*/
@PublicApi
public class EmailAuthCredential extends AuthCredential {
@Field(1)
@PublicApi(exclude = true)
public String email;
@Field(2)
@PublicApi(exclude = true)
public String password;
@Field(3)
@PublicApi(exclude = true)
public String signInLink;
@Field(4)
@PublicApi(exclude = true)
public String cachedState;
@Field(5)
@PublicApi(exclude = true)
public boolean isForLinking;
/**
* Returns the unique string identifier for the provider type with which the credential is associated.
*/
@Override
public String getProvider() {
return "password";
}
/**
* Returns either {@link EmailAuthProvider#EMAIL_LINK_SIGN_IN_METHOD} for a credential generated with {@link EmailAuthProvider#getCredentialWithLink(String, String)} or {@link EmailAuthProvider#EMAIL_PASSWORD_SIGN_IN_METHOD} for a credential generated with {@link EmailAuthProvider#getCredential(String, String)}.
*/
@Override
public String getSignInMethod() {
if (password != null && !password.isEmpty()) {
return "password";
}
return "emailLink";
}
public static final Creator<EmailAuthCredential> CREATOR = new AutoCreator<>(EmailAuthCredential.class);
}

View File

@ -0,0 +1,32 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
* Notice: Portions of this file are reproduced from work created and shared by Google and used
* according to terms described in the Creative Commons 4.0 Attribution License.
* See https://developers.google.com/readme/policies for details.
*/
package com.google.firebase.auth;
import org.microg.gms.common.PublicApi;
/**
* Holds credentials generated by a sign-in with a credential to an IDP that uses OAuth
*/
@PublicApi
public abstract class OAuthCredential extends AuthCredential {
/**
* Returns the OAuth access token associated with this credential.
*/
public abstract String getAccessToken();
/**
* Returns the OAuth ID token associated with this credential.
*/
public abstract String getIdToken();
/**
* Returns the OAuth secret associated with this credential. This will be null for OAuth 2.0 providers.
*/
public abstract String getSecret();
}

View File

@ -0,0 +1,64 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
* Notice: Portions of this file are reproduced from work created and shared by Google and used
* according to terms described in the Creative Commons 4.0 Attribution License.
* See https://developers.google.com/readme/policies for details.
*/
package com.google.firebase.auth;
import org.microg.gms.common.PublicApi;
/**
* Wraps phone number and verification information for authentication purposes.
*/
@PublicApi
public class PhoneAuthCredential extends AuthCredential {
@Field(1)
@PublicApi(exclude = true)
public String sessionInfo;
@Field(2)
@PublicApi(exclude = true)
public String smsCode;
@Field(3)
@PublicApi(exclude = true)
public boolean hasVerificationCode;
@Field(4)
@PublicApi(exclude = true)
public String phoneNumber;
@Field(5)
@PublicApi(exclude = true)
public boolean autoCreate;
@Field(6)
@PublicApi(exclude = true)
public String temporaryProof;
@Field(7)
@PublicApi(exclude = true)
public String mfaEnrollmentId;
/**
* Returns the unique string identifier for the provider type with which the credential is associated.
*/
@Override
public String getProvider() {
return "phone";
}
/**
* Returns the unique string identifier for the sign in method with which the credential is associated. Should match that returned by {@link FirebaseAuth#fetchSignInMethodsForEmail(String)} after this user has signed in with this type of credential.
*/
@Override
public String getSignInMethod() {
return "phone";
}
/**
* Gets the auto-retrieved SMS verification code if applicable. When SMS verification is used, you will be called back first via onCodeSent(String, PhoneAuthProvider.ForceResendingToken), and later onVerificationCompleted(PhoneAuthCredential) with a {@link PhoneAuthCredential} containing a non-null SMS code if auto-retrieval succeeded. If Firebase used another approach to verify the phone number and triggers a callback via onVerificationCompleted(PhoneAuthCredential), then SMS code can be null.
*/
public String getSmsCode() {
return smsCode;
}
public static final Creator<PhoneAuthCredential> CREATOR = new AutoCreator<>(PhoneAuthCredential.class);
}

View File

@ -0,0 +1,88 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
* Notice: Portions of this file are reproduced from work created and shared by Google and used
* according to terms described in the Creative Commons 4.0 Attribution License.
* See https://developers.google.com/readme/policies for details.
*/
package com.google.firebase.auth;
import android.net.Uri;
import org.microg.gms.common.PublicApi;
import org.microg.safeparcel.AutoSafeParcelable;
/**
* Request used to update user profile information.
*/
@PublicApi
public class UserProfileChangeRequest extends AutoSafeParcelable {
@Field(1)
@PublicApi(exclude = true)
public String displayName;
@Field(2)
@PublicApi(exclude = true)
public String photoUrl;
@Field(3)
@PublicApi(exclude = true)
public boolean shouldRemoveDisplayName;
@Field(4)
@PublicApi(exclude = true)
public boolean shouldRemovePhotoUri;
private UserProfileChangeRequest() {
}
public String getDisplayName() {
return displayName;
}
public Uri getPhotoUri() {
return Uri.parse(photoUrl);
}
/**
* The request builder.
*/
public static class Builder {
private String displayName;
private Uri photoUri;
private boolean shouldRemoveDisplayName;
private boolean shouldRemovePhotoUri;
/**
* Sets the updated display name.
* @return the {@link UserProfileChangeRequest.Builder} for chaining
*/
public Builder setDisplayName(String displayName) {
this.displayName = displayName;
shouldRemoveDisplayName = displayName == null;
return this;
}
/**
* Sets the updated photo {@link Uri}.
* @return the {@link UserProfileChangeRequest.Builder} for chaining
*/
public Builder setPhotoUri(Uri photoUri) {
this.photoUri = photoUri;
shouldRemovePhotoUri = photoUri == null;
return this;
}
/**
* Returns a {@link UserProfileChangeRequest} instance
*/
public UserProfileChangeRequest build() {
UserProfileChangeRequest request = new UserProfileChangeRequest();
request.displayName = displayName;
request.photoUrl = photoUri.toString();
request.shouldRemoveDisplayName = shouldRemoveDisplayName;
request.shouldRemovePhotoUri = shouldRemovePhotoUri;
return request;
}
}
public static final Creator<UserProfileChangeRequest> CREATOR = new AutoCreator<>(UserProfileChangeRequest.class);
}

View File

@ -0,0 +1,12 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
public class ApplyActionCodeAidlRequest extends AutoSafeParcelable {
public static final Creator<ApplyActionCodeAidlRequest> CREATOR = new AutoCreator<>(ApplyActionCodeAidlRequest.class);
}

View File

@ -0,0 +1,12 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
public class ChangeEmailAidlRequest extends AutoSafeParcelable {
public static final Creator<ChangeEmailAidlRequest> CREATOR = new AutoCreator<>(ChangeEmailAidlRequest.class);
}

View File

@ -0,0 +1,12 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
public class ChangePasswordAidlRequest extends AutoSafeParcelable {
public static final Creator<ChangePasswordAidlRequest> CREATOR = new AutoCreator<>(ChangePasswordAidlRequest.class);
}

View File

@ -0,0 +1,12 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
public class CheckActionCodeAidlRequest extends AutoSafeParcelable {
public static final Creator<CheckActionCodeAidlRequest> CREATOR = new AutoCreator<>(CheckActionCodeAidlRequest.class);
}

View File

@ -0,0 +1,12 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
public class ConfirmPasswordResetAidlRequest extends AutoSafeParcelable {
public static final Creator<ConfirmPasswordResetAidlRequest> CREATOR = new AutoCreator<>(ConfirmPasswordResetAidlRequest.class);
}

View File

@ -0,0 +1,27 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
import java.util.ArrayList;
import java.util.List;
public class CreateAuthUriResponse extends AutoSafeParcelable {
@Field(2)
public String authUri;
@Field(3)
public boolean isRegistered;
@Field(4)
public String providerId;
@Field(5)
public boolean isForExistingProvider;
@Field(6)
public StringList stringList = new StringList();
@Field(7)
public List<String> signInMethods = new ArrayList<>();
public static final Creator<CreateAuthUriResponse> CREATOR = new AutoCreator<>(CreateAuthUriResponse.class);
}

View File

@ -0,0 +1,19 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
public class CreateUserWithEmailAndPasswordAidlRequest extends AutoSafeParcelable {
@Field(1)
public String email;
@Field(2)
public String password;
@Field(3)
public String tenantId;
public static final Creator<CreateUserWithEmailAndPasswordAidlRequest> CREATOR = new AutoCreator<>(CreateUserWithEmailAndPasswordAidlRequest.class);
}

View File

@ -0,0 +1,12 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
public class DeleteAidlRequest extends AutoSafeParcelable {
public static final Creator<DeleteAidlRequest> CREATOR = new AutoCreator<>(DeleteAidlRequest.class);
}

View File

@ -0,0 +1,12 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
public class FinalizeMfaEnrollmentAidlRequest extends AutoSafeParcelable {
public static final Creator<FinalizeMfaEnrollmentAidlRequest> CREATOR = new AutoCreator<>(FinalizeMfaEnrollmentAidlRequest.class);
}

View File

@ -0,0 +1,12 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
public class FinalizeMfaSignInAidlRequest extends AutoSafeParcelable {
public static final Creator<FinalizeMfaSignInAidlRequest> CREATOR = new AutoCreator<>(FinalizeMfaSignInAidlRequest.class);
}

View File

@ -0,0 +1,15 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
public class GetAccessTokenAidlRequest extends AutoSafeParcelable {
@Field(1)
public String refreshToken;
public static final Creator<GetAccessTokenAidlRequest> CREATOR = new AutoCreator<>(GetAccessTokenAidlRequest.class);
}

View File

@ -0,0 +1,43 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import com.google.firebase.auth.DefaultOAuthCredential;
import org.microg.safeparcel.AutoSafeParcelable;
import java.util.List;
public class GetAccountInfoUser extends AutoSafeParcelable {
@Field(2)
public String localId;
@Field(3)
public String email;
@Field(4)
public boolean isEmailVerified;
@Field(5)
public String displayName;
@Field(6)
public String photoUrl;
@Field(7)
public ProviderUserInfoList providerInfoList = new ProviderUserInfoList();
@Field(8)
public String password;
@Field(9)
public String phoneNumber;
@Field(10)
public long creationTimestamp;
@Field(11)
public long lastSignInTimestamp;
@Field(12)
public boolean isNewUser;
@Field(13)
public DefaultOAuthCredential defaultOAuthCredential;
@Field(14)
public List<MfaInfo> mfaInfoList;
public static final Creator<GetAccountInfoUser> CREATOR = new AutoCreator<>(GetAccountInfoUser.class);
}

View File

@ -0,0 +1,16 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
public class GetProvidersForEmailAidlRequest extends AutoSafeParcelable {
@Field(1)
public String email;
@Field(2)
public String tenantId;
public static final Creator<GetProvidersForEmailAidlRequest> CREATOR = new AutoCreator<>(GetProvidersForEmailAidlRequest.class);
}

View File

@ -0,0 +1,44 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.json.JSONException;
import org.json.JSONObject;
import org.microg.safeparcel.AutoSafeParcelable;
public class GetTokenResponse extends AutoSafeParcelable {
@Field(2)
public String refreshToken;
@Field(3)
public String accessToken;
@Field(4)
public Long expiresIn;
@Field(5)
public String tokenType;
@Field(6)
public Long issuedAt;
public GetTokenResponse() {
issuedAt = System.currentTimeMillis();
}
public static GetTokenResponse parseJson(String json) {
try {
JSONObject object = new JSONObject(json);
GetTokenResponse response = new GetTokenResponse();
response.refreshToken = object.optString("refresh_token", null);
response.accessToken = object.optString("access_token", null);
response.tokenType = object.optString("token_type", null);
response.expiresIn = object.optLong("expires_in");
response.issuedAt = object.optLong("issued_at");
return response;
} catch (JSONException e) {
throw new RuntimeException(e);
}
}
public static final Creator<GetTokenResponse> CREATOR = new AutoCreator<>(GetTokenResponse.class);
}

View File

@ -0,0 +1,18 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
public class LinkEmailAuthCredentialAidlRequest extends AutoSafeParcelable {
@Field(1)
public String email;
@Field(2)
public String password;
@Field(3)
public String cachedState;
public static final Creator<LinkEmailAuthCredentialAidlRequest> CREATOR = new AutoCreator<>(LinkEmailAuthCredentialAidlRequest.class);
}

View File

@ -0,0 +1,12 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
public class LinkFederatedCredentialAidlRequest extends AutoSafeParcelable {
public static final Creator<LinkFederatedCredentialAidlRequest> CREATOR = new AutoCreator<>(LinkFederatedCredentialAidlRequest.class);
}

View File

@ -0,0 +1,12 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
public class LinkPhoneAuthCredentialAidlRequest extends AutoSafeParcelable {
public static final Creator<LinkPhoneAuthCredentialAidlRequest> CREATOR = new AutoCreator<>(LinkPhoneAuthCredentialAidlRequest.class);
}

View File

@ -0,0 +1,14 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
public class MfaInfo extends AutoSafeParcelable {
public static final Creator<MfaInfo> CREATOR = new AutoCreator<>(MfaInfo.class);
}

View File

@ -0,0 +1,27 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
public class ProviderUserInfo extends AutoSafeParcelable {
@Field(2)
public String federatedId;
@Field(3)
public String displayName;
@Field(4)
public String photoUrl;
@Field(5)
public String providerId;
@Field(6)
public String rawUserInfo;
@Field(7)
public String phoneNumber;
@Field(8)
public String email;
public static final Creator<ProviderUserInfo> CREATOR = new AutoCreator<>(ProviderUserInfo.class);
}

View File

@ -0,0 +1,19 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
import java.util.ArrayList;
import java.util.List;
public class ProviderUserInfoList extends AutoSafeParcelable {
@Field(2)
public List<ProviderUserInfo> providerUserInfos = new ArrayList<>();
public static final Creator<ProviderUserInfoList> CREATOR = new AutoCreator<>(ProviderUserInfoList.class);
}

View File

@ -0,0 +1,14 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
public class ReloadAidlRequest extends AutoSafeParcelable {
@Field(1)
public String cachedState;
public static final Creator<ReloadAidlRequest> CREATOR = new AutoCreator<>(ReloadAidlRequest.class);
}

View File

@ -0,0 +1,20 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
public class ResetPasswordResponse extends AutoSafeParcelable {
@Field(2)
public String email;
@Field(3)
public String newEmail;
@Field(4)
public String requestType;
@Field(5)
public MfaInfo mfaInfo;
public static final Creator<ResetPasswordResponse> CREATOR = new AutoCreator<>(ResetPasswordResponse.class);
}

View File

@ -0,0 +1,18 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import com.google.firebase.auth.ActionCodeSettings;
import org.microg.safeparcel.AutoSafeParcelable;
public class SendEmailVerificationWithSettingsAidlRequest extends AutoSafeParcelable {
@Field(1)
public String token;
@Field(2)
public ActionCodeSettings settings;
public static final Creator<SendEmailVerificationWithSettingsAidlRequest> CREATOR = new AutoCreator<>(SendEmailVerificationWithSettingsAidlRequest.class);
}

View File

@ -0,0 +1,20 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import com.google.firebase.auth.ActionCodeSettings;
import org.microg.safeparcel.AutoSafeParcelable;
public class SendGetOobConfirmationCodeEmailAidlRequest extends AutoSafeParcelable {
@Field(1)
public String email;
@Field(2)
public ActionCodeSettings settings;
@Field(3)
public String tenantId;
public static final Creator<SendGetOobConfirmationCodeEmailAidlRequest> CREATOR = new AutoCreator<>(SendGetOobConfirmationCodeEmailAidlRequest.class);
}

View File

@ -0,0 +1,14 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
public class SendVerificationCodeAidlRequest extends AutoSafeParcelable {
@Field(1)
public SendVerificationCodeRequest request;
public static final Creator<SendVerificationCodeAidlRequest> CREATOR = new AutoCreator<>(SendVerificationCodeAidlRequest.class);
}

View File

@ -0,0 +1,25 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
public class SendVerificationCodeRequest extends AutoSafeParcelable {
@Field(1)
public String phoneNumber;
@Field(2)
public Long timeoutInSeconds;
@Field(3)
public boolean forceNewSmsVerificationSession;
@Field(4)
public String languageHeader;
@Field(5)
public String tenantId;
@Field(6)
public String recaptchaToken;
public static final Creator<SendVerificationCodeRequest> CREATOR = new AutoCreator<>(SendVerificationCodeRequest.class);
}

View File

@ -0,0 +1,12 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
public class SetFirebaseUiVersionAidlRequest extends AutoSafeParcelable {
public static final Creator<SetFirebaseUiVersionAidlRequest> CREATOR = new AutoCreator<>(SetFirebaseUiVersionAidlRequest.class);
}

View File

@ -0,0 +1,14 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
public class SignInAnonymouslyAidlRequest extends AutoSafeParcelable {
@Field(1)
public String tenantId;
public static final Creator<SignInAnonymouslyAidlRequest> CREATOR = new AutoCreator<>(SignInAnonymouslyAidlRequest.class);
}

View File

@ -0,0 +1,12 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
public class SignInWithCredentialAidlRequest extends AutoSafeParcelable {
public static final Creator<SignInWithCredentialAidlRequest> CREATOR = new AutoCreator<>(SignInWithCredentialAidlRequest.class);
}

View File

@ -0,0 +1,17 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
public class SignInWithCustomTokenAidlRequest extends AutoSafeParcelable {
@Field(1)
public String token;
@Field(2)
public String tenantId;
public static final Creator<SignInWithCustomTokenAidlRequest> CREATOR = new AutoCreator<>(SignInWithCustomTokenAidlRequest.class);
}

View File

@ -0,0 +1,18 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
public class SignInWithEmailAndPasswordAidlRequest extends AutoSafeParcelable {
@Field(1)
public String email;
@Field(2)
public String password;
@Field(3)
public String tenantId;
public static final Creator<SignInWithEmailAndPasswordAidlRequest> CREATOR = new AutoCreator<>(SignInWithEmailAndPasswordAidlRequest.class);
}

View File

@ -0,0 +1,12 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
public class SignInWithEmailLinkAidlRequest extends AutoSafeParcelable {
public static final Creator<SignInWithEmailLinkAidlRequest> CREATOR = new AutoCreator<>(SignInWithEmailLinkAidlRequest.class);
}

View File

@ -0,0 +1,19 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import com.google.firebase.auth.PhoneAuthCredential;
import org.microg.safeparcel.AutoSafeParcelable;
public class SignInWithPhoneNumberAidlRequest extends AutoSafeParcelable {
@Field(1)
public PhoneAuthCredential credential;
@Field(2)
public String tenantId;
public static final Creator<SignInWithPhoneNumberAidlRequest> CREATOR = new AutoCreator<>(SignInWithPhoneNumberAidlRequest.class);
}

View File

@ -0,0 +1,12 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
public class StartMfaPhoneNumberEnrollmentAidlRequest extends AutoSafeParcelable {
public static final Creator<StartMfaPhoneNumberEnrollmentAidlRequest> CREATOR = new AutoCreator<>(StartMfaPhoneNumberEnrollmentAidlRequest.class);
}

View File

@ -0,0 +1,12 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
public class StartMfaPhoneNumberSignInAidlRequest extends AutoSafeParcelable {
public static final Creator<StartMfaPhoneNumberSignInAidlRequest> CREATOR = new AutoCreator<>(StartMfaPhoneNumberSignInAidlRequest.class);
}

View File

@ -0,0 +1,19 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
import java.util.ArrayList;
import java.util.List;
public class StringList extends AutoSafeParcelable {
@Field(1)
public int versionCode = 1;
@Field(2)
public List<String> values = new ArrayList<>();
public static final Creator<StringList> CREATOR = new AutoCreator<>(StringList.class);
}

View File

@ -0,0 +1,12 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
public class UnenrollMfaAidlRequest extends AutoSafeParcelable {
public static final Creator<UnenrollMfaAidlRequest> CREATOR = new AutoCreator<>(UnenrollMfaAidlRequest.class);
}

View File

@ -0,0 +1,12 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
public class UnlinkEmailCredentialAidlRequest extends AutoSafeParcelable {
public static final Creator<UnlinkEmailCredentialAidlRequest> CREATOR = new AutoCreator<>(UnlinkEmailCredentialAidlRequest.class);
}

View File

@ -0,0 +1,12 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
public class UnlinkFederatedCredentialAidlRequest extends AutoSafeParcelable {
public static final Creator<UnlinkFederatedCredentialAidlRequest> CREATOR = new AutoCreator<>(UnlinkFederatedCredentialAidlRequest.class);
}

View File

@ -0,0 +1,18 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import com.google.firebase.auth.UserProfileChangeRequest;
import org.microg.safeparcel.AutoSafeParcelable;
public class UpdateProfileAidlRequest extends AutoSafeParcelable {
@Field(1)
public UserProfileChangeRequest request;
@Field(2)
public String cachedState;
public static final Creator<UpdateProfileAidlRequest> CREATOR = new AutoCreator<>(UpdateProfileAidlRequest.class);
}

View File

@ -0,0 +1,12 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
public class VerifyAssertionRequest extends AutoSafeParcelable {
public static final Creator<VerifyAssertionRequest> CREATOR = new AutoCreator<>(VerifyAssertionRequest.class);
}

View File

@ -0,0 +1,12 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.auth.api.internal;
import org.microg.safeparcel.AutoSafeParcelable;
public class VerifyBeforeUpdateEmailAidlRequest extends AutoSafeParcelable {
public static final Creator<VerifyBeforeUpdateEmailAidlRequest> CREATOR = new AutoCreator<>(VerifyBeforeUpdateEmailAidlRequest.class);
}

View File

@ -0,0 +1,11 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package org.microg.gms.firebase.auth;
public class Constants {
public static final String EXTRA_API_KEY = "com.google.firebase.auth.API_KEY";
public static final String EXTRA_LIBRARY_VERSION = "com.google.firebase.auth.LIBRARY_VERSION";
}

View File

@ -0,0 +1,46 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
dependencies {
api project(':firebase-auth-api')
implementation "androidx.lifecycle:lifecycle-service:$lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion"
implementation "androidx.appcompat:appcompat:$appcompatVersion"
implementation project(':play-services-base-core')
implementation project(':play-services-base-core-ui')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutineVersion"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutineVersion"
implementation "com.android.volley:volley:$volleyVersion"
}
android {
compileSdkVersion androidCompileSdk
buildToolsVersion "$androidBuildVersionTools"
defaultConfig {
versionName version
minSdkVersion androidMinSdk
targetSdkVersion androidTargetSdk
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
compileOptions {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
}

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ SPDX-FileCopyrightText: 2020, microG Project Team
~ SPDX-License-Identifier: Apache-2.0
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.microg.gms.firebase.auth.core">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<application>
<service android:name="org.microg.gms.firebase.auth.FirebaseAuthService">
<intent-filter>
<action android:name="com.google.firebase.auth.api.gms.service.START" />
</intent-filter>
</service>
<activity
android:name="org.microg.gms.firebase.auth.ReCaptchaActivity"
android:exported="false"
android:process=":ui"
android:theme="@style/Theme.AppCompat.Light.Dialog.Alert.NoActionBar" />
</application>
</manifest>

Some files were not shown because too many files have changed in this diff Show More