Skip to content

Commit

Permalink
cmd: Add --allowed-cors-origins to client create.
Browse files Browse the repository at this point in the history
This allows the creation of clients permitted to make CORS requests from
specific domains.

Signed-off-by: Josh Giles <jgiles@paxos.com>
  • Loading branch information
jgiles committed Feb 27, 2019
1 parent 685c6da commit bf7699f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/cli/handler_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ func (h *ClientHandler) CreateClient(cmd *cobra.Command, args []string) {
PolicyUri: flagx.MustGetString(cmd, "policy-uri"),
LogoUri: flagx.MustGetString(cmd, "logo-uri"),
ClientUri: flagx.MustGetString(cmd, "client-uri"),
AllowedCorsOrigins: flagx.MustGetStringSlice(cmd, "allowed-cors-origins"),
SubjectType: flagx.MustGetString(cmd, "subject-type"),
Audience: flagx.MustGetStringSlice(cmd, "audience"),
}
Expand Down
1 change: 1 addition & 0 deletions cmd/clients_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ func init() {
clientsCreateCmd.Flags().String("tos-uri", "", "A URL string that points to a human-readable terms of service document for the client that describes a contractual relationship between the end-user and the client that the end-user accepts when authorizing the client")
clientsCreateCmd.Flags().String("client-uri", "", "A URL string of a web page providing information about the client")
clientsCreateCmd.Flags().String("logo-uri", "", "A URL string that references a logo for the client")
clientsCreateCmd.Flags().StringSlice("allowed-cors-origins", []string{}, "The list of URLs allowed to make CORS requests. Requires CORS_ENABLED.")
clientsCreateCmd.Flags().String("subject-type", "public", "A URL string that references a logo for the client")
clientsCreateCmd.Flags().String("secret", "", "Provide the client's secret")
clientsCreateCmd.Flags().StringP("name", "n", "", "The client's name")
Expand Down

0 comments on commit bf7699f

Please sign in to comment.