Skip to content

Conversation

@cozminu
Copy link

@cozminu cozminu commented Dec 31, 2025

Addresses #2 , #3 , #4

@cozminu cozminu self-assigned this Dec 31, 2025
@cozminu cozminu requested a review from golobitch December 31, 2025 16:56
@cozminu cozminu marked this pull request as ready for review January 23, 2026 10:51
@cozminu cozminu requested a review from koekiebox January 27, 2026 15:16
using OpenPayments.Sdk.HttpSignatureUtils;

/// <summary>
///
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since this extension is public and not internal, lets define summary here

if (keyBytes.Length != 32 && keyBytes.Length != 64)
if (keyBytes.Length != 32 && keyBytes.Length != 64 && keyBytes.Length != 48)
{
Console.WriteLine($"Key length was {keyBytes.Length} bytes, expected 32 or 64.");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is is ok to use console.writeline in library?

Copy link
Author

Choose a reason for hiding this comment

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

Forgot that while debugging, will use this opportunity to cleanup remaining temporary code.

Copy link
Collaborator

@golobitch golobitch left a comment

Choose a reason for hiding this comment

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

@cozminu without a doubt, this is an amazing job that you did! Thank you for this. I don't see any big problems with this implementation right now. Maybe I would have some nitpicks if I dive a little bit dipper but nothing to big.

I would however wait also on @koekiebox to take a look at this PR.

Thank you !

Copy link

@koekiebox koekiebox left a comment

Choose a reason for hiding this comment

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

Couple of comments, rest looks good @cozminu . 🚀 , some notes that may not be applicable:

  • How much do we want to rely on comments? Or do we largely depend on openpayments.dev docs?
  • Do we need to cover integration tests, and to which level?

Choose a reason for hiding this comment

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

Can we add a .gitignore for the .idea folder and exclude? Specific to Jetbrains.

if (keyBytes.Length != 32 && keyBytes.Length != 64)
if (keyBytes.Length != 32 && keyBytes.Length != 64 && keyBytes.Length != 48)
{
Console.WriteLine($"Key length was {keyBytes.Length} bytes, expected 32 or 64.");

Choose a reason for hiding this comment

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

The logic allows for 32, 64 and 48, but the console output only mentions 32 and 64.


public AuthContractResolver()
{
// this.SetProp(typeof(Response), "Interact");

Choose a reason for hiding this comment

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

To be removed?

MemberSerialization memberSerialization)
{
var prop = base.CreateProperty(member, memberSerialization);
prop.Required = Required.AllowNull;

Choose a reason for hiding this comment

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

I may have missed it, is there a way to control the JSON fields order?

Choose a reason for hiding this comment

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

Do we want to include this file?

}
);

// Console.WriteLine(JsonSerializer.Serialize(response, new JsonSerializerOptions { WriteIndented = true }));

Choose a reason for hiding this comment

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

To be removed?

{
Start = [Start.Redirect],
// Finish = new Finish()
// {

Choose a reason for hiding this comment

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

To be removed?

partial void PrepareRequest(HttpClient client, HttpRequestMessage request,
string url)
{
if (_privateKey == null || _keyId == null) return;

Choose a reason for hiding this comment

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

Do we want to log at least a warning here? Or is it handled elsewhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants