-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1159 refactor authz cpp file #1161
Conversation
Reviewer's Guide by SourceryThis PR refactors the AuthzWorker class by splitting it into header and implementation files, improving code organization, adding comprehensive documentation, and introducing unit tests. The changes focus on better code structure, maintainability, and testability while preserving the original functionality. Class diagram for the refactored AuthzWorkerclassDiagram
class AuthzWorker {
+AuthzWorker(Config *a_config, LogContext log_context)
+~AuthzWorker()
+int checkAuth(char *client_id, char *path, char *action)
+bool isTestPath(const std::string &) const
+bool isURLValid(char * full_ftp_url) const
+bool isPathValid(const std::string & posix_path) const
+std::string getAuthzPath(char * full_ftp_url)
+std::string removeOrigin(char * full_ftp_url) const
+int processResponse(ICommunicator::Response & response)
-void initCommunicator()
-Config *m_config
-std::string m_test_path
-std::string m_local_globus_path_root
-LogContext m_log_context
-std::unique_ptr<ICredentials> m_sec_ctx
-std::unique_ptr<ICommunicator> m_comm
-std::unordered_map<CredentialType, std::string> m_cred_options
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @JoshuaSBrown - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
@par-hermes format |
1 similar comment
@par-hermes format |
#DEPENDS
This PR should be merged first. https://github.com/ORNL/DataFed/pull/1158/files
Summary by Sourcery
Refactor the AuthzWorker class to enhance code clarity and maintainability by modularizing functionality into specific methods. Update the build system to support building and linking tests for the AuthzWorker class, including necessary dependencies. Implement comprehensive unit tests to ensure the correctness of the AuthzWorker's functionality and the getVersion function.
Enhancements:
Build:
Tests: