Skip to content

Conversation

@KoditkarVedant
Copy link
Contributor

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes #472

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • AuthenticationClientTests.Create_and_revoke_token

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes authentication for the Notion API by adding support for basic authentication in token creation and revocation endpoints, addressing issue #472.

Key changes:

  • Add basic authentication parameter support to REST client methods
  • Update authentication request classes to include client credentials
  • Create helper utilities for basic authentication header generation

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Test/Notion.IntegrationTests/IntegrationTestBase.cs Refactors environment variable retrieval into a reusable method
Test/Notion.IntegrationTests/AuthenticationClientTests.cs Adds integration test for token creation and revocation with basic auth
Src/Notion.Client/RestClient/RestClient.cs Extends REST client to support basic authentication parameters
Src/Notion.Client/RestClient/IRestClient.cs Updates interface to include basic authentication parameter
Src/Notion.Client/Api/Authentication/RevokeToken/Request/RevokeTokenRequest.cs Adds client credentials properties for basic auth
Src/Notion.Client/Api/Authentication/RevokeToken/AuthenticationClient.cs Updates method to pass basic auth parameters
Src/Notion.Client/Api/Authentication/IBasicAuthenticationParameters.cs Defines interface for basic authentication parameters
Src/Notion.Client/Api/Authentication/HeaderHelpers.cs Provides utility for creating basic auth header values
Src/Notion.Client/Api/Authentication/CreateToken/Request/CreateTokenRequest.cs Adds client credentials properties for basic auth
Src/Notion.Client/Api/Authentication/CreateToken/AuthenticationClient.cs Updates method to pass basic auth parameters

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@notion-dotnet notion-dotnet deleted a comment from Copilot AI Sep 20, 2025
@KoditkarVedant KoditkarVedant merged commit 1a55497 into main Sep 20, 2025
7 checks passed
@KoditkarVedant KoditkarVedant deleted the fix/472-add-a-way-to-use-basic-authentication-for-authentication-endpoint branch September 20, 2025 20:39
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.

Allow Basic Authentication for Authentication Client

1 participant