Skip to content

Conversation

@Iamsdt
Copy link
Collaborator

@Iamsdt Iamsdt commented Dec 1, 2025

This pull request improves the robustness of custom authentication module loading in the agentflow_cli by adding validation and handling for file paths specified in the authentication configuration. The main changes ensure that both the method and path are provided, and that the specified file path exists before attempting to load the module.

Validation and error handling for authentication configuration:

  • Added checks to ensure both 'method' and 'path' are specified in auth_config, raising a ValueError if either is missing.
  • Implemented logic to extract and normalize the file path from the auth_config['path'], handling both filesystem paths and dotted module paths, and verifying that the file exists before loading. Raises a ValueError if the file does not exist.
  • Imported os and Path from pathlib to support the new file path handling logic.

@Iamsdt Iamsdt linked an issue Dec 1, 2025 that may be closed by this pull request
@Iamsdt Iamsdt merged commit 011f286 into main Dec 1, 2025
1 check passed
@Iamsdt Iamsdt deleted the 17-custom-auth-path-validation-fails-due-to-incorrect-path-parsing branch December 1, 2025 16:32
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.

Custom Auth Path Validation Fails Due to Incorrect Path Parsing

2 participants