Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
* SPDX-FileCopyrightText: 2025 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/

package com.google.android.gms.auth.api.identity;

parcelable AuthorizationRequest;
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
* SPDX-FileCopyrightText: 2025 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/

package com.google.android.gms.auth.api.identity;

parcelable AuthorizationResult;
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
* SPDX-FileCopyrightText: 2025 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/

package com.google.android.gms.auth.api.identity;

parcelable VerifyWithGoogleRequest;
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
* SPDX-FileCopyrightText: 2025 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/

package com.google.android.gms.auth.api.identity;

parcelable VerifyWithGoogleResult;
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* SPDX-FileCopyrightText: 2025 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;
import com.google.android.gms.auth.api.identity.AuthorizationResult;

interface IAuthorizationCallback {
void onAuthorized(in Status status, in AuthorizationResult result);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* SPDX-FileCopyrightText: 2025 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.internal.IAuthorizationCallback;
import com.google.android.gms.auth.api.identity.internal.IVerifyWithGoogleCallback;
import com.google.android.gms.auth.api.identity.AuthorizationRequest;
import com.google.android.gms.auth.api.identity.VerifyWithGoogleRequest;

interface IAuthorizationService {
void authorize(in IAuthorizationCallback callback, in AuthorizationRequest request) = 0;
void verifyWithGoogle(in IVerifyWithGoogleCallback callback, in VerifyWithGoogleRequest request) = 1;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* SPDX-FileCopyrightText: 2025 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;
import com.google.android.gms.auth.api.identity.VerifyWithGoogleResult;

interface IVerifyWithGoogleCallback {
void onVerifed(in Status status, in VerifyWithGoogleResult result);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/**
* SPDX-FileCopyrightText: 2025 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/

package com.google.android.gms.auth.api.identity;

import android.accounts.Account;
import android.os.Bundle;
import android.os.Parcel;

import androidx.annotation.NonNull;

import com.google.android.gms.common.api.Scope;
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.List;

@SafeParcelable.Class
public class AuthorizationRequest extends AbstractSafeParcelable {

@Field(1)
public List<Scope> requestedScopes;
@Field(2)
public String serverClientId;
@Field(3)
public boolean serverAuthCodeRequested;
@Field(4)
public boolean idTokenRequested;
@Field(5)
public Account account;
@Field(6)
public String hostedDomainFilter;
@Field(7)
public String sessionId;
@Field(8)
public boolean forceCodeForRefreshToken;
@Field(9)
public Bundle bundle;
@Field(10)
public boolean offlineAccess;

@Override
public void writeToParcel(@NonNull Parcel dest, int flags) {
CREATOR.writeToParcel(this, dest, flags);
}

public static final SafeParcelableCreatorAndWriter<AuthorizationRequest> CREATOR = findCreator(AuthorizationRequest.class);

@Override
public String toString() {
return "AuthorizationRequest{" +
"requestedScopes=" + requestedScopes +
", serverClientId='" + serverClientId + '\'' +
", serverAuthCodeRequested=" + serverAuthCodeRequested +
", idTokenRequested=" + idTokenRequested +
", account=" + account +
", hostedDomainFilter='" + hostedDomainFilter + '\'' +
", sessionId='" + sessionId + '\'' +
", forceCodeForRefreshToken=" + forceCodeForRefreshToken +
", bundle=" + bundle +
", offlineAccess=" + offlineAccess +
'}';
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/**
* SPDX-FileCopyrightText: 2025 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.auth.api.signin.GoogleSignInAccount;
import com.google.android.gms.common.api.Scope;
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.List;

@SafeParcelable.Class
public class AuthorizationResult extends AbstractSafeParcelable {

@Field(1)
public String serverAuthToken;
@Field(2)
public String idToken;
@Field(3)
public String refreshToken;
@Field(4)
public List<Scope> grantedScopes;
@Field(5)
public GoogleSignInAccount googleSignInAccount;
@Field(6)
public PendingIntent pendingIntent;

@Override
public void writeToParcel(@NonNull Parcel dest, int flags) {
CREATOR.writeToParcel(this, dest, flags);
}

public static final SafeParcelableCreatorAndWriter<AuthorizationResult> CREATOR = findCreator(AuthorizationResult.class);

@Override
public String toString() {
return "AuthorizationResult{" +
" serverAuthToken='" + serverAuthToken + '\'' +
", idToken='" + idToken + '\'' +
", refreshToken='" + refreshToken + '\'' +
", grantedScopes=" + grantedScopes +
", googleSignInAccount=" + googleSignInAccount +
", pendingIntent=" + pendingIntent +
'}';
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/**
* SPDX-FileCopyrightText: 2025 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.api.Scope;
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.List;

@SafeParcelable.Class
public class VerifyWithGoogleRequest extends AbstractSafeParcelable {

@Field(1)
public List<Scope> requestedScopes;
@Field(2)
public String serverClientId;
@Field(3)
public boolean offlineAccess;
@Field(4)
public String sessionId;

@Override
public void writeToParcel(@NonNull Parcel dest, int flags) {
CREATOR.writeToParcel(this, dest, flags);
}

public static final SafeParcelableCreatorAndWriter<VerifyWithGoogleRequest> CREATOR = findCreator(VerifyWithGoogleRequest.class);

@Override
public String toString() {
return "VerifyWithGoogleRequest{" +
"requestedScopes=" + requestedScopes +
", serverClientId='" + serverClientId + '\'' +
", offlineAccess=" + offlineAccess +
", sessionId='" + sessionId + '\'' +
'}';
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/**
* SPDX-FileCopyrightText: 2025 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.api.Scope;
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.List;

@SafeParcelable.Class
public class VerifyWithGoogleResult extends AbstractSafeParcelable {

@Field(1)
public String serverAuthToken;
@Field(2)
public String idToken;
@Field(3)
public List<Scope> grantedScopes;
@Field(4)
public PendingIntent pendingIntent;

@Override
public void writeToParcel(@NonNull Parcel dest, int flags) {
CREATOR.writeToParcel(this, dest, flags);
}

public static final SafeParcelableCreatorAndWriter<VerifyWithGoogleResult> CREATOR = findCreator(VerifyWithGoogleResult.class);

@Override
public String toString() {
return "VerifyWithGoogleResult{" +
"serverAuthToken='" + serverAuthToken + '\'' +
", idToken='" + idToken + '\'' +
", grantedScopes=" + grantedScopes +
", pendingIntent=" + pendingIntent +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,10 @@ public Builder(GoogleSignInOptions options) {
this.serverClientId = options.serverClientId;
this.account = options.account;
this.hostedDomain = options.hostedDomain;
for (GoogleSignInOptionsExtensionParcelable extension : options.extensions) {
extensionMap.put(extension.type, extension);
if (options.extensions != null) {
for (GoogleSignInOptionsExtensionParcelable extension : options.extensions) {
extensionMap.put(extension.type, extension);
}
}
}

Expand Down
7 changes: 6 additions & 1 deletion play-services-core/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,12 @@
android:name="org.microg.gms.auth.signin.SignInConfigurationService"
android:exported="false" />

<service android:name="org.microg.gms.auth.credentials.identity.AuthorizationService">
<intent-filter>
<action android:name="com.google.android.gms.auth.api.identity.service.authorization.START" />
</intent-filter>
</service>

<service android:name="org.microg.gms.auth.credentials.identity.IdentitySignInService">
<intent-filter>
<action android:name="com.google.android.gms.auth.api.identity.service.signin.START" />
Expand Down Expand Up @@ -1048,7 +1054,6 @@
<action android:name="com.google.android.gms.auth.account.authenticator.auto.service.START" />
<action android:name="com.google.android.gms.auth.account.authenticator.chromeos.START" />
<action android:name="com.google.android.gms.auth.account.authenticator.tv.service.START" />
<action android:name="com.google.android.gms.auth.api.identity.service.authorization.START" />
<action android:name="com.google.android.gms.auth.api.identity.service.credentialsaving.START" />
<action android:name="com.google.android.gms.auth.api.phone.service.InternalService.START" />
<action android:name="com.google.android.gms.auth.api.signin.service.START" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ val FEATURES = arrayOf(
Feature("auth_api_credentials_save_password", 4),
Feature("auth_api_credentials_get_sign_in_intent", 6),
Feature("auth_api_credentials_save_account_linking_token", 3),
Feature("auth_api_credentials_get_phone_number_hint_intent", 3)
Feature("auth_api_credentials_get_phone_number_hint_intent", 3),
Feature("auth_api_credentials_verify_with_google", 1)
)

class CredentialsService : BaseService(TAG, GmsService.CREDENTIALS) {
Expand Down
Loading