Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 3, 2025

  • Create AbstractTokenController extending AbstractBasicController
  • Implement token-based authentication without authenticate/logout flow
  • Configure Bearer header by default
  • Create TokenAuthController concrete class
  • Add test file for AbstractTokenController
  • Run tests to verify implementation
  • Add usage documentation to AbstractTokenController
  • Remove unused imports
  • Support both 'token' and 'api_token' credential properties for backward compatibility
Original prompt

This section details on the original issue you should resolve

<issue_title>Implement a Token Based Auth Controller</issue_title>
<issue_description>Many APIs that work for server to server integration simply provide an API Token that is configured in the environment and passed along via standard Bearer Authorization header like an Oauth Token, without the Login/Logout flow. We need an AuthController for Token Based authentication added for this common scenario.</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #21

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits October 3, 2025 17:20
Co-authored-by: MichaelJ2324 <3056352+MichaelJ2324@users.noreply.github.com>
Co-authored-by: MichaelJ2324 <3056352+MichaelJ2324@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement a Token Based Auth Controller Implement Token Based Auth Controller for API token authentication Oct 3, 2025
Copilot AI requested a review from MichaelJ2324 October 3, 2025 17:24
Copy link
Owner

@MichaelJ2324 MichaelJ2324 left a comment

Choose a reason for hiding this comment

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

@copilot need to allow setting of token via multiple properties for backward compatibility with previous implementations of this repo that built it out already.

…ility

Co-authored-by: MichaelJ2324 <3056352+MichaelJ2324@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Oct 6, 2025

@copilot need to allow setting of token via multiple properties for backward compatibility with previous implementations of this repo that built it out already.

Implemented support for both 'token' and 'api_token' properties in setCredentials() method. Added comprehensive tests including precedence behavior when both properties are provided.

Copy link
Owner

@MichaelJ2324 MichaelJ2324 left a comment

Choose a reason for hiding this comment

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

LGTM

@MichaelJ2324 MichaelJ2324 marked this pull request as ready for review October 8, 2025 18:19
@MichaelJ2324 MichaelJ2324 merged commit ec3cdc4 into master Oct 8, 2025
6 checks passed
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.

Implement a Token Based Auth Controller

2 participants