()
| 17 | } |
| 18 | |
| 19 | func newAuthCommand() *authCommand { |
| 20 | ac := &authCommand{} |
| 21 | ac.cmd = &cobra.Command{ |
| 22 | Use: "auth", |
| 23 | Short: "Manage authentication", |
| 24 | Long: "Manage authentication with the HEY server via Launchpad OAuth.", |
| 25 | Annotations: map[string]string{ |
| 26 | "agent_notes": "Use status to check auth before other commands. Returns token expiry info in JSON. Use login --token for non-interactive auth.", |
| 27 | }, |
| 28 | } |
| 29 | |
| 30 | ac.cmd.AddCommand(newAuthLoginCommand()) |
| 31 | ac.cmd.AddCommand(newAuthLogoutCommand()) |
| 32 | ac.cmd.AddCommand(newAuthStatusCommand()) |
| 33 | ac.cmd.AddCommand(newAuthRefreshCommand()) |
| 34 | ac.cmd.AddCommand(newAuthTokenCommand()) |
| 35 | |
| 36 | return ac |
| 37 | } |
| 38 | |
| 39 | // login subcommand |
| 40 |
no test coverage detected