Skip to content

Conversation

@gapra-msft
Copy link
Member

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors authentication-related functionality by migrating login, logout, and login status operations from the cmd package to a centralized azcopy library. This consolidation improves code organization and reusability by moving business logic out of command handlers.

Key Changes:

  • Created new azcopy/loginlogout.go file with Login(), Logout(), and GetLoginStatus() methods on the Client type
  • Refactored command handlers in cmd/login.go, cmd/logout.go, and cmd/loginStatus.go to call the new library methods
  • Moved LoginOptions type definition from cmd to common package and aliased it in azcopy package

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
azcopy/loginlogout.go New file implementing centralized login, logout, and status check methods on Client
cmd/login.go Simplified to delegate login logic to library; moved environment variable handling to toOptions()
cmd/logout.go Removed local RunLogout() and process() methods; now calls Client.Logout()
cmd/loginStatus.go Removed local status processing; now calls Client.GetLoginStatus() and references LoginType instead of AuthMethod

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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.

3 participants