Skip to content

Conversation

@ryu-sato
Copy link

This pull request adds support for custom authorization headers in the @growi/sdk-typescript package, allowing users to override the default Bearer token authentication. This is particularly useful for environments where GROWI is protected by Digest authentication, Basic authentication, or custom proxy authentication. The changes include updates to documentation (in both English and Japanese), comprehensive test coverage, and additional input validation in the AxiosInstanceManager.

Authorization header override and authentication improvements:

  • Added an authorizationHeader option to AxiosInstanceManager.addAxiosInstance(), allowing users to specify custom authorization headers instead of the default Bearer token. When provided, the GROWI access token is sent via the X-GROWI-ACCESS-TOKEN header, supporting Digest, Basic, and custom authentication schemes. [1] [2]

Documentation updates:

  • Updated README.md and README_JP.md with detailed explanations and usage examples for the new authorizationHeader functionality, including code samples for Bearer, Digest, and Basic authentication scenarios. [1] [2] [3] [4]

Testing and validation:

  • Added comprehensive test cases in axios-instance-manager.test.ts to cover the new functionality, including edge cases and error handling for invalid input.
  • Implemented input validation in addAxiosInstance to ensure appName, baseURL, and token are non-empty strings, throwing descriptive errors for invalid input.

@ryu-sato ryu-sato requested review from miya and yuki-takei October 25, 2025 15:13
@changeset-bot
Copy link

changeset-bot bot commented Oct 25, 2025

🦋 Changeset detected

Latest commit: 933bb27

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@growi/sdk-typescript Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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.

1 participant