-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add identity sign-in service (#2130)
- Loading branch information
1 parent
3a8cdce
commit 048a6e5
Showing
22 changed files
with
472 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...vices-auth/src/main/aidl/com/google/android/gms/auth/api/identity/BeginSignInRequest.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.auth.api.identity; | ||
|
||
parcelable BeginSignInRequest; |
8 changes: 8 additions & 0 deletions
8
...rvices-auth/src/main/aidl/com/google/android/gms/auth/api/identity/BeginSignInResult.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.auth.api.identity; | ||
|
||
parcelable BeginSignInResult; |
8 changes: 8 additions & 0 deletions
8
...c/main/aidl/com/google/android/gms/auth/api/identity/GetPhoneNumberHintIntentRequest.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.auth.api.identity; | ||
|
||
parcelable GetPhoneNumberHintIntentRequest; |
8 changes: 8 additions & 0 deletions
8
...s-auth/src/main/aidl/com/google/android/gms/auth/api/identity/GetSignInIntentRequest.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.auth.api.identity; | ||
|
||
parcelable GetSignInIntentRequest; |
8 changes: 8 additions & 0 deletions
8
...ervices-auth/src/main/aidl/com/google/android/gms/auth/api/identity/SignInCredential.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.auth.api.identity; | ||
|
||
parcelable SignInCredential; |
13 changes: 13 additions & 0 deletions
13
...src/main/aidl/com/google/android/gms/auth/api/identity/internal/IBeginSignInCallback.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.auth.api.identity.internal; | ||
|
||
import com.google.android.gms.auth.api.identity.BeginSignInResult; | ||
import com.google.android.gms.common.api.Status; | ||
|
||
interface IBeginSignInCallback { | ||
void onResult(in Status status, in BeginSignInResult beginSignInResult); | ||
} |
12 changes: 12 additions & 0 deletions
12
.../com/google/android/gms/auth/api/identity/internal/IGetPhoneNumberHintIntentCallback.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.auth.api.identity.internal; | ||
|
||
import com.google.android.gms.common.api.Status; | ||
|
||
interface IGetPhoneNumberHintIntentCallback { | ||
void onResult(in Status status, in PendingIntent pendingIntent); | ||
} |
12 changes: 12 additions & 0 deletions
12
...main/aidl/com/google/android/gms/auth/api/identity/internal/IGetSignInIntentCallback.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.auth.api.identity.internal; | ||
|
||
import com.google.android.gms.common.api.Status; | ||
|
||
interface IGetSignInIntentCallback { | ||
void onResult(in Status status, in PendingIntent pendingIntent); | ||
} |
21 changes: 21 additions & 0 deletions
21
...-auth/src/main/aidl/com/google/android/gms/auth/api/identity/internal/ISignInService.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.auth.api.identity.internal; | ||
|
||
import com.google.android.gms.common.api.internal.IStatusCallback; | ||
import com.google.android.gms.auth.api.identity.internal.IBeginSignInCallback; | ||
import com.google.android.gms.auth.api.identity.internal.IGetSignInIntentCallback; | ||
import com.google.android.gms.auth.api.identity.internal.IGetPhoneNumberHintIntentCallback; | ||
import com.google.android.gms.auth.api.identity.BeginSignInRequest; | ||
import com.google.android.gms.auth.api.identity.GetSignInIntentRequest; | ||
import com.google.android.gms.auth.api.identity.GetPhoneNumberHintIntentRequest; | ||
|
||
interface ISignInService { | ||
void beginSignIn(in IBeginSignInCallback callback, in BeginSignInRequest request) = 0; | ||
void signOut(in IStatusCallback callback, String userId) = 1; | ||
void getSignInIntent(in IGetSignInIntentCallback callback, in GetSignInIntentRequest request) = 2; | ||
void getPhoneNumberHintIntent(in IGetPhoneNumberHintIntentCallback callback, in GetPhoneNumberHintIntentRequest request) = 3; | ||
} |
35 changes: 35 additions & 0 deletions
35
...vices-auth/src/main/java/com/google/android/gms/auth/api/identity/BeginSignInRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.auth.api.identity; | ||
|
||
import android.os.Parcel; | ||
|
||
import androidx.annotation.NonNull; | ||
|
||
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; | ||
import com.google.android.gms.common.internal.safeparcel.SafeParcelable; | ||
import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; | ||
|
||
@SafeParcelable.Class | ||
public class BeginSignInRequest extends AbstractSafeParcelable { | ||
@Field(1) | ||
public PasswordRequestOptions passwordRequestOptions; | ||
@Field(2) | ||
public GoogleIdTokenRequestOptions googleIdTokenRequestOptions; | ||
@Field(3) | ||
public String score; | ||
@Field(4) | ||
public boolean isPrimary; | ||
@Field(5) | ||
public int code; | ||
|
||
@Override | ||
public void writeToParcel(@NonNull Parcel dest, int flags) { | ||
CREATOR.writeToParcel(this, dest, flags); | ||
} | ||
|
||
public static final SafeParcelableCreatorAndWriter<BeginSignInRequest> CREATOR = findCreator(BeginSignInRequest.class); | ||
} |
28 changes: 28 additions & 0 deletions
28
...rvices-auth/src/main/java/com/google/android/gms/auth/api/identity/BeginSignInResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.auth.api.identity; | ||
|
||
import android.app.PendingIntent; | ||
import android.os.Parcel; | ||
|
||
import androidx.annotation.NonNull; | ||
|
||
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; | ||
import com.google.android.gms.common.internal.safeparcel.SafeParcelable; | ||
import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; | ||
|
||
@SafeParcelable.Class | ||
public class BeginSignInResult extends AbstractSafeParcelable { | ||
@Field(1) | ||
public PendingIntent pendingIntent; | ||
|
||
@Override | ||
public void writeToParcel(@NonNull Parcel dest, int flags) { | ||
CREATOR.writeToParcel(this, dest, flags); | ||
} | ||
|
||
public static final SafeParcelableCreatorAndWriter<BeginSignInResult> CREATOR = findCreator(BeginSignInResult.class); | ||
} |
27 changes: 27 additions & 0 deletions
27
...c/main/java/com/google/android/gms/auth/api/identity/GetPhoneNumberHintIntentRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.auth.api.identity; | ||
|
||
import android.os.Parcel; | ||
|
||
import androidx.annotation.NonNull; | ||
|
||
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; | ||
import com.google.android.gms.common.internal.safeparcel.SafeParcelable; | ||
import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; | ||
|
||
@SafeParcelable.Class | ||
public class GetPhoneNumberHintIntentRequest extends AbstractSafeParcelable { | ||
@Field(1) | ||
public int code; | ||
|
||
@Override | ||
public void writeToParcel(@NonNull Parcel dest, int flags) { | ||
CREATOR.writeToParcel(this, dest, flags); | ||
} | ||
|
||
public static final SafeParcelableCreatorAndWriter<GetPhoneNumberHintIntentRequest> CREATOR = findCreator(GetPhoneNumberHintIntentRequest.class); | ||
} |
38 changes: 38 additions & 0 deletions
38
...s-auth/src/main/java/com/google/android/gms/auth/api/identity/GetSignInIntentRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.auth.api.identity; | ||
|
||
import android.os.Parcel; | ||
|
||
import androidx.annotation.NonNull; | ||
|
||
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; | ||
import com.google.android.gms.common.internal.safeparcel.SafeParcelable; | ||
import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; | ||
|
||
@SafeParcelable.Class | ||
public class GetSignInIntentRequest extends AbstractSafeParcelable { | ||
@Field(1) | ||
public String clientId; | ||
@Field(2) | ||
public String scope; | ||
@Field(3) | ||
public String requestTag; | ||
@Field(4) | ||
public String requestToken; | ||
@Field(5) | ||
public boolean isPrimary; | ||
@Field(6) | ||
public int code; | ||
|
||
@Override | ||
public void writeToParcel(@NonNull Parcel dest, int flags) { | ||
CREATOR.writeToParcel(this, dest, flags); | ||
} | ||
|
||
public static final SafeParcelableCreatorAndWriter<GetSignInIntentRequest> CREATOR = findCreator(GetSignInIntentRequest.class); | ||
|
||
} |
41 changes: 41 additions & 0 deletions
41
...h/src/main/java/com/google/android/gms/auth/api/identity/GoogleIdTokenRequestOptions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.auth.api.identity; | ||
|
||
import android.os.Parcel; | ||
|
||
import androidx.annotation.NonNull; | ||
|
||
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; | ||
import com.google.android.gms.common.internal.safeparcel.SafeParcelable; | ||
import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; | ||
|
||
import java.util.ArrayList; | ||
|
||
@SafeParcelable.Class | ||
public class GoogleIdTokenRequestOptions extends AbstractSafeParcelable { | ||
@Field(1) | ||
public boolean idTokenRequested; | ||
@Field(2) | ||
public String clientId; | ||
@Field(3) | ||
public String requestToken; | ||
@Field(4) | ||
public boolean serverAuthCodeRequested; | ||
@Field(5) | ||
public String serverClientId; | ||
@Field(6) | ||
public ArrayList<String> scopes; | ||
@Field(7) | ||
public boolean forceCodeForRefreshToken; | ||
|
||
@Override | ||
public void writeToParcel(@NonNull Parcel dest, int flags) { | ||
CREATOR.writeToParcel(this, dest, flags); | ||
} | ||
|
||
public static final SafeParcelableCreatorAndWriter<GoogleIdTokenRequestOptions> CREATOR = findCreator(GoogleIdTokenRequestOptions.class); | ||
} |
27 changes: 27 additions & 0 deletions
27
...s-auth/src/main/java/com/google/android/gms/auth/api/identity/PasswordRequestOptions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.auth.api.identity; | ||
|
||
import android.os.Parcel; | ||
|
||
import androidx.annotation.NonNull; | ||
|
||
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; | ||
import com.google.android.gms.common.internal.safeparcel.SafeParcelable; | ||
import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; | ||
|
||
@SafeParcelable.Class | ||
public class PasswordRequestOptions extends AbstractSafeParcelable { | ||
@Field(1) | ||
public boolean primary; | ||
|
||
@Override | ||
public void writeToParcel(@NonNull Parcel dest, int flags) { | ||
CREATOR.writeToParcel(this, dest, flags); | ||
} | ||
|
||
public static final SafeParcelableCreatorAndWriter<PasswordRequestOptions> CREATOR = findCreator(PasswordRequestOptions.class); | ||
} |
41 changes: 41 additions & 0 deletions
41
...ervices-auth/src/main/java/com/google/android/gms/auth/api/identity/SignInCredential.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.auth.api.identity; | ||
|
||
import android.os.Parcel; | ||
|
||
import androidx.annotation.NonNull; | ||
|
||
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; | ||
import com.google.android.gms.common.internal.safeparcel.SafeParcelable; | ||
import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; | ||
|
||
@SafeParcelable.Class | ||
public class SignInCredential extends AbstractSafeParcelable { | ||
@Field(1) | ||
public String email; | ||
@Field(2) | ||
public String displayName; | ||
@Field(3) | ||
public String familyName; | ||
@Field(4) | ||
public String givenName; | ||
@Field(5) | ||
public String avatar; | ||
@Field(6) | ||
public String serverAuthCode; | ||
@Field(7) | ||
public String idToken; | ||
@Field(8) | ||
public String obfuscatedIdentifier; | ||
|
||
@Override | ||
public void writeToParcel(@NonNull Parcel dest, int flags) { | ||
CREATOR.writeToParcel(this, dest, flags); | ||
} | ||
|
||
public static final SafeParcelableCreatorAndWriter<SignInCredential> CREATOR = findCreator(SignInCredential.class); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.