Skip to content
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

better login commands #81

Merged
merged 2 commits into from
Mar 8, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion natster/natster.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,15 @@ func main() {
UnNegatableBoolVar(&HubOpts.AllowAll)
hub_up.Action(StartCatalogServer)

auth := ncli.Command("auth", "Authenticate your local context for use with natster.io")
auth := ncli.Command("auth", "Authenticate your local context for use with natster.io").Hidden()
weblogin := auth.Command("web", "Authenticate with one time code")
weblogin.Flag("qrcode", "Displays QR code in terminal of login link").Default("false").UnNegatableBoolVar(&WebLoginOpts.DisplayQR)
weblogin.Action(WebLogin)

login := ncli.Command("login", "Authenticate your local context for use with natster.io")
login.Flag("qrcode", "Displays QR code in terminal of login link").Default("false").UnNegatableBoolVar(&WebLoginOpts.DisplayQR)
login.Action(WebLogin)

claim := ncli.Command("claim", "Claims an OTC code. For testing only - Can only be done from the natster.io account").Hidden()
claim.Arg("code", "Previously generated one-time code").Required().StringVar(&ClaimOpts.Code)
claim.Arg("identity", "OAuth identity string").Required().StringVar(&ClaimOpts.OAuthIdentity)
Expand Down
Loading