top

Package SDK offers convenience functions for Go code around Hydra's HTTP APIs.

 import "github.com/ory-am/hydra/sdk"
 import "github.com/ory-am/hydra/client"

 var hydra, err = sdk.Connect(
	sdk.ClientID("client-id"),
	sdk.ClientSecret("client-secret"),
 	sdk.ClusterURL("https://localhost:4444"),
 )

 // You now have access to the various API endpoints of hydra, for example the oauth2 client endpoint:
 var newClient, err = hydra.Client.CreateClient(&client.Client{
 	ID:                "deadbeef",
 	Secret:            "sup3rs3cret",
 	RedirectURIs:      []string{"http://yourapp/callback"},
 	// ...
 })

 // Retrieve newly created client
 var gotClient, err = hydra.Client.GetClient(newClient.ID)

Imports 11 package(s)

  1. github.com/ory-am/hydra/warden
  2. golang.org/x/oauth2
  3. gopkg.in/yaml.v2
  4. github.com/ory-am/hydra/connection
  5. github.com/ory-am/hydra/jwk
  6. github.com/ory-am/hydra/pkg
  7. golang.org/x/net/context
  8. github.com/ory-am/hydra/oauth2
  9. github.com/ory-am/hydra/policy
  10. golang.org/x/oauth2/clientcredentials
  11. github.com/ory-am/hydra/client

Test imports 1 package(s)

  1. github.com/stretchr/testify/assert