Skip to content

Commit

Permalink
v0.0.7: cleanup/normalize auth api
Browse files Browse the repository at this point in the history
  • Loading branch information
geemus committed Jan 3, 2024
1 parent aabfc62 commit a8bef6f
Show file tree
Hide file tree
Showing 5 changed files with 140 additions and 121 deletions.
28 changes: 26 additions & 2 deletions api/openapi.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions auth/signin.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (s *SignIn) run(ctx context.Context, tty termenv.File) error {
return err
}

codesRes, err := anc.Post("/auth/cli/codes", "application/json", nil)
codesRes, err := anc.Post("/cli/codes", "application/json", nil)
if err != nil {
return err
}
Expand Down Expand Up @@ -92,7 +92,7 @@ func (s *SignIn) run(ctx context.Context, tty termenv.File) error {
if err = json.NewEncoder(body).Encode(req); err != nil {
return err
}
tokensRes, err := anc.Post("/auth/cli/pat_tokens", "application/json", body)
tokensRes, err := anc.Post("/cli/pat-tokens", "application/json", body)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/anchor/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ var (

Name: "whoami",
Use: "whoami",
Short: "Identitify your account",
Short: "Identify current account",
Long: heredoc.Doc(`
Print the details of the Anchor account for your local system user.
`),
Expand Down
61 changes: 29 additions & 32 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,63 +1,60 @@
module github.com/anchordotdev/cli

go 1.20
go 1.21

require (
github.com/MakeNowJust/heredoc v1.0.0
github.com/cli/browser v1.1.0
github.com/creack/pty v1.1.18
github.com/deepmap/oapi-codegen v1.12.4
github.com/cli/browser v1.3.0
github.com/creack/pty v1.1.21
github.com/deepmap/oapi-codegen v1.16.2
github.com/gofrs/flock v0.8.1
github.com/google/go-github/v54 v54.0.0
github.com/joeshaw/envdecode v0.0.0-20200121155833-099f1fc765bd
github.com/mattn/go-isatty v0.0.17
github.com/mattn/go-isatty v0.0.20
github.com/mcuadros/go-defaults v1.2.0
github.com/muesli/termenv v0.15.1
github.com/spf13/cobra v1.7.0
github.com/muesli/termenv v0.15.2
github.com/oapi-codegen/runtime v1.1.0
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
github.com/zalando/go-keyring v0.2.2
golang.org/x/exp v0.0.0-20230321023759-10a507213a29
golang.org/x/sync v0.2.0
howett.net/plist v1.0.0
github.com/zalando/go-keyring v0.2.3
golang.org/x/exp v0.0.0-20231006140011-7918f672742d
golang.org/x/sync v0.5.0
howett.net/plist v1.0.1
)

require (
github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect
github.com/alessio/shellescape v1.4.1 // indirect
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/cloudflare/circl v1.3.3 // indirect
github.com/danieljoos/wincred v1.1.2 // indirect
github.com/getkin/kin-openapi v0.107.0 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/danieljoos/wincred v1.2.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/getkin/kin-openapi v0.118.0 // indirect
github.com/go-openapi/jsonpointer v0.20.0 // indirect
github.com/go-openapi/swag v0.22.4 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/google/uuid v1.4.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/invopop/yaml v0.1.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/labstack/echo/v4 v4.9.1 // indirect
github.com/labstack/gommon v0.4.0 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/perimeterx/marshmallow v1.1.4 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/rogpeppe/go-internal v1.10.0 // indirect
github.com/stretchr/testify v1.8.4 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
golang.org/x/crypto v0.12.0 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.14.0 // indirect
golang.org/x/oauth2 v0.11.0 // indirect
golang.org/x/sys v0.11.0 // indirect
golang.org/x/text v0.12.0 // indirect
golang.org/x/tools v0.8.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/oauth2 v0.13.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.14.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
Loading

0 comments on commit a8bef6f

Please sign in to comment.