Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PROTOTYPE: Auth separation #2405

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
100 changes: 0 additions & 100 deletions Src/Support/Google.Apis.Auth/ExistingDependencies/JsonExplicitNull.cs

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using Google.Apis.Auth.OAuth2;
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;

namespace Google.Apis.Auth.ExistingDependencies;

// The replacement for NewtonsoftJsonSerializer
internal class ReplacementSerializer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the idea to take a dependency on System.Text.Json or to just serialize/deserialize by hand?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no opinion on that at the moment :)

{
internal static string Serialize<T>(T value) => default;

internal static T Deserialize<T>(string json) => default;

public static Task<T> DeserializeAsync<T>(Stream stream, CancellationToken cancellationToken) => default;

public static T Deserialize<T>(Stream stream) => default;
}
2 changes: 1 addition & 1 deletion Src/Support/Google.Apis.Auth/JsonWebSignature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public static Task<Payload> VerifySignedTokenAsync(
/// <exception cref="InvalidJwtException">If the token is invalid or expired.</exception>
/// <typeparam name="TPayload">The type of the payload to return, so user code can validate
/// additional claims. Should extend <see cref="Payload"/>. Payload information will be deserialized
/// using <see cref="NewtonsoftJsonSerializer.Instance"/>.</typeparam>
/// using the default serializer.</typeparam>
public async static Task<TPayload> VerifySignedTokenAsync<TPayload>(
string signedJwt, SignedTokenVerificationOptions options = null, CancellationToken cancellationToken = default)
where TPayload : Payload
Expand Down
Loading