Skip to content

Commit

Permalink
APP-6993: Deprecate legacy auth-app commands in favor of oauth-app co…
Browse files Browse the repository at this point in the history
…mmands (#4732)
  • Loading branch information
jr22 authored Jan 24, 2025
1 parent 1c4d115 commit 89c8bef
Show file tree
Hide file tree
Showing 12 changed files with 63 additions and 499 deletions.
107 changes: 0 additions & 107 deletions cli/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,6 @@ const (

packageFlagFramework = "model-framework"

// TODO: APP-6993 remove these flags.
authApplicationFlagName = "application-name"
authApplicationFlagApplicationID = "application-id"
authApplicationFlagOriginURIs = "origin-uris"
authApplicationFlagRedirectURIs = "redirect-uris"
authApplicationFlagLogoutURI = "logout-uri"

oauthAppFlagClientID = "client-id"
oauthAppFlagClientName = "client-name"
oauthAppFlagClientAuthentication = "client-authentication"
Expand Down Expand Up @@ -2755,106 +2748,6 @@ This won't work unless you have an existing installation of our GitHub app on yo
},
},
},
{
Name: "auth-app",
Usage: "manage third party auth applications",
UsageText: createUsageText("auth-app", nil, false, true),
HideHelpCommand: true,
Subcommands: []*cli.Command{
{
Name: "register",
Usage: "register a third party auth application",
UsageText: createUsageText("auth-app register",
[]string{
generalFlagOrgID, authApplicationFlagName, authApplicationFlagOriginURIs,
authApplicationFlagRedirectURIs, authApplicationFlagLogoutURI,
}, false, false),
Flags: []cli.Flag{
&cli.StringFlag{
Name: generalFlagOrgID,
Usage: "organization ID that will be tied to auth application",
Required: true,
},
&cli.StringFlag{
Name: authApplicationFlagName,
Usage: "name for the auth application",
Required: true,
},
&cli.StringSliceFlag{
Name: authApplicationFlagOriginURIs,
Usage: "origin uris for the auth application",
Required: true,
},
&cli.StringSliceFlag{
Name: authApplicationFlagRedirectURIs,
Usage: "redirect uris for the auth application",
Required: true,
},
&cli.StringFlag{
Name: authApplicationFlagLogoutURI,
Usage: "logout uri for the auth application",
Required: true,
},
},
Action: createCommandWithT[registerAuthApplicationArgs](RegisterAuthApplicationAction),
},
{
Name: "update",
Usage: "update a third party auth application",
UsageText: createUsageText(
"auth-app update", []string{generalFlagOrgID, authApplicationFlagApplicationID, authApplicationFlagName}, false, false,
),
Flags: []cli.Flag{
&cli.StringFlag{
Name: generalFlagOrgID,
Required: true,
Usage: "organization ID that will be tied to auth application",
},
&cli.StringFlag{
Name: authApplicationFlagApplicationID,
Usage: "id for the auth application",
Required: true,
},
&cli.StringFlag{
Name: authApplicationFlagName,
Usage: "updated name for the auth application",
Required: true,
},
&cli.StringSliceFlag{
Name: authApplicationFlagOriginURIs,
Usage: "updated origin uris for the auth application",
},
&cli.StringSliceFlag{
Name: authApplicationFlagRedirectURIs,
Usage: "updated redirect uris for the auth application",
},
&cli.StringFlag{
Name: authApplicationFlagLogoutURI,
Usage: "updated logout uri for the auth application",
},
},
Action: createCommandWithT[updateAuthApplicationArgs](UpdateAuthApplicationAction),
},
{
Name: "get",
Usage: "get configuration for a third party auth application",
UsageText: createUsageText("auth-app get", []string{generalFlagOrgID, authApplicationFlagApplicationID}, false, false),
Flags: []cli.Flag{
&cli.StringFlag{
Name: generalFlagOrgID,
Required: true,
Usage: "organization ID that will be tied to auth application",
},
&cli.StringFlag{
Name: authApplicationFlagApplicationID,
Usage: "id for the auth application",
Required: true,
},
},
Action: createCommandWithT[getAuthApplicationArgs](GetAuthApplicationAction),
},
},
},
{
Name: "version",
Usage: "print version info for this program",
Expand Down
1 change: 0 additions & 1 deletion cli/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,6 @@ func (c *viamClient) ensureLoggedInInner() error {
c.dataClient = datapb.NewDataServiceClient(conn)
c.packageClient = packagepb.NewPackageServiceClient(conn)
c.datasetClient = datasetpb.NewDatasetServiceClient(conn)
c.endUserClient = apppb.NewEndUserServiceClient(conn)
c.mlTrainingClient = mltrainingpb.NewMLTrainingServiceClient(conn)
c.buildClient = buildpb.NewBuildServiceClient(conn)

Expand Down
155 changes: 0 additions & 155 deletions cli/auth_application.go

This file was deleted.

114 changes: 0 additions & 114 deletions cli/auth_application_test.go

This file was deleted.

Loading

0 comments on commit 89c8bef

Please sign in to comment.