feat: add OAuth2 diode:ingest scope to authentication process #43
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces support for OAuth2 scopes in the
DiodeClient
authentication flow, specifically adding thediode:ingest
scope for ingestion operations. The changes include updates to the client code to handle scopes and modifications to the test suite to validate the new functionality.Authentication Enhancements:
_OAUTH2_INGEST_SCOPE
for thediode:ingest
scope innetboxlabs/diode/sdk/client.py
. This scope is now passed during authentication for ingestion operations. [1] [2]_authenticate
method to accept ascope
parameter and pass it to the_DiodeAuthentication
class._DiodeAuthentication
class to include ascope
attribute and ensure the scope is sent in the OAuth2 token request. [1] [2]Test Updates:
tests/test_client.py
to include thescope="diode:ingest"
parameter when initializing_DiodeAuthentication
. This ensures the new scope functionality is properly tested. [1] [2] [3] [4]