How to create client using SDK


#1
package main

import (
	"encoding/json"
	"fmt"
	"log"

	swagger "github.com/ory/hydra/sdk/go/hydra/swagger"
)

func main() {

	sdk := swagger.NewAdminApiWithBasePath("http://localhost:4445")

	client, resp, err := sdk.CreateOAuth2Client(swagger.OAuth2Client{
		ClientId:      "steve",
		ClientSecret:  "steve",
		RedirectUris:  []string{"http://baidu.com"},
		Scope:         "openid",
		GrantTypes:    []string{"refresh_token", "authorization_code"},
		ResponseTypes: []string{"code", "id_token"},
	})

	if err != nil {
		log.Fatal(err)
	}

	clientJS, _ := json.Marshal(client)
	fmt.Printf("====> %s \n", clientJS)

	respJS, _ := json.Marshal(resp)
	fmt.Printf("=====> %s \n", respJS)
}

After run this code, i execute

hydra clients get steve --endpoint http://localhost:4445.

But i can’t found my client called steve