Skip to content

refactor: extract authentication into auth module - #22

Open
VedantMadane wants to merge 1 commit into
Toyota:mainfrom
VedantMadane:refactor/issue-21-extract-auth
Open

refactor: extract authentication into auth module#22
VedantMadane wants to merge 1 commit into
Toyota:mainfrom
VedantMadane:refactor/issue-21-extract-auth

Conversation

@VedantMadane

Copy link
Copy Markdown

Summary

Extract authentication-related implementation from confluence.rs into a dedicated auth module (#21).

Changes

  • Add src/auth.rs with resolve_auth, base64_encode, auth_headers, binary_auth_headers
  • Move cloud/PAT auth unit tests with the helpers
  • Re-export resolve_auth from confluence so main.rs imports stay stable
  • Document the module in ARCHITECTURE.md

Fixes #21

Move resolve_auth, base64_encode, and Authorization header builders (plus their unit tests) out of confluence.rs into src/auth.rs. Re-export resolve_auth from confluence for existing callers.

Fixes Toyota#21

Signed-off-by: Vedant Madane <6527493+VedantMadane@users.noreply.github.com>

@takeoverjp takeoverjp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@VedantMadane
Thank you for your contribution! 🎉
This PR breaks mise run ci.
Could you please check it?

https://github.com/Toyota/confluence2md/actions/runs/32652938814/job/97442643414?pr=22#step:4:153

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.

refactoring: Extract the authentication-related implementation from confluence.rs

2 participants