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

Added POST ConnectAuthorize endpoint, added test for the endpoint, method to IAgendEndpoint.cs #343

Merged

Conversation

IvanKolchanov
Copy link
Contributor

@IvanKolchanov IvanKolchanov commented Jun 26, 2024

Resolves #341

@IvanKolchanov IvanKolchanov marked this pull request as ready for review June 27, 2024 19:01
@@ -63,6 +63,7 @@ public interface IAgentEndpoint
Task<QueryResult<LocalServiceHealth>> GetLocalServiceHealthByID(string serviceID, QueryOptions q, CancellationToken ct = default);
Task<QueryResult<LocalServiceHealth>> GetLocalServiceHealthByID(string serviceID, CancellationToken ct = default);
Task<QueryResult<Metrics>> GetAgentMetrics(CancellationToken ct = default);
Task<WriteResult<AgentAuthorizeResponse>> ConnectAuthorize(AgentAuthorizeParams parameters, CancellationToken ct = default);
Copy link
Contributor

Choose a reason for hiding this comment

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

We can also add an overload with query options.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh yeah, that makes a lot of sense. Haven't seen that pattern in code with WriteResult so it didn't occur to me. Will implement.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I didn't notice this is a write request, in this case we use WriteOptions instead of QueryOptions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep yep, that's what I thought. Just pushed the commit, waiting for the tests to run!

…overload to ConnectAuthorize to support WriteOptions
@marcin-krystianc marcin-krystianc merged commit e585c38 into G-Research:master Jul 1, 2024
243 checks passed
@IvanKolchanov IvanKolchanov deleted the add-connect-authorize branch July 2, 2024 11:26
@github-actions github-actions bot restored the add-connect-authorize branch July 2, 2024 11:26
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.

[FEATURE REQUEST]: Connect Authorize, tests whether a connection attempt is authorized between two services
2 participants