github.com/elopio/cli@v6.21.2-0.20160902224010-ea909d1fdb2f+incompatible/commands/v2/login_command.go (about) 1 package v2 2 3 import ( 4 "os" 5 6 "code.cloudfoundry.org/cli/cf/cmd" 7 "code.cloudfoundry.org/cli/commands" 8 ) 9 10 type LoginCommand struct { 11 APIEndpoint string `short:"a" description:"API endpoint (e.g. https://api.example.com)"` 12 Organization string `short:"o" description:"Org"` 13 Password string `short:"p" description:"Password"` 14 Space string `short:"s" description:"Space"` 15 SkipSSLValidation bool `long:"skip-ssl-validation" description:"Skip verification of the API endpoint. Not recommended!"` 16 SSO bool `long:"sso" description:"Use a one-time password to login"` 17 Username string `short:"u" description:"Username"` 18 usage interface{} `usage:"CF_NAME login [-a API_URL] [-u USERNAME] [-p PASSWORD] [-o ORG] [-s SPACE]\n\nWARNING:\n Providing your password as a command line option is highly discouraged\n Your password may be visible to others and may be recorded in your shell history\n\nEXAMPLES:\n CF_NAME login (omit username and password to login interactively -- CF_NAME will prompt for both)\n CF_NAME login -u name@example.com -p pa55woRD (specify username and password as arguments)\n CF_NAME login -u name@example.com -p \"my password\" (use quotes for passwords with a space)\n CF_NAME login -u name@example.com -p \"\\\"password\\\"\" (escape quotes if used in password)\n CF_NAME login --sso (CF_NAME will provide a url to obtain a one-time password to login)"` 19 relatedCommands interface{} `related_commands:"api, auth, target"` 20 } 21 22 func (_ LoginCommand) Setup(config commands.Config, ui commands.UI) error { 23 return nil 24 } 25 26 func (_ LoginCommand) Execute(args []string) error { 27 cmd.Main(os.Getenv("CF_TRACE"), os.Args) 28 return nil 29 }