Hey you don't need to write HTTP clients for go. Hydra ships with tested client libraries for Go. Here for example:
https://github.com/ory-am/hydra/blob/master/jwk/manager_http.go
Sorry that this isn't documented anywhere..
--
You received this message because you are subscribed to the Google Groups "ory-hydra" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ory-hydra+...@googlegroups.com.
To post to this group, send email to ory-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ory-hydra/cdc3ec6b-b71e-4a3b-9b78-6658fee01c36%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You will need to implement some functionality like getting an access token for the APIs :) But you don't need to implement handlers for most of them!
So you're on the right path but it would be smarter to wire
together the HTTP managers from hydra instead of writing your own
:)
To view this discussion on the web visit https://groups.google.com/d/msgid/ory-hydra/2d7cc555-ad25-4b80-8504-288cbd3eccd3%40googlegroups.com.
You could create a struct with embedded fields:
struct HTTPClient {
*jwk.HTTPManager
//...
}
and have a method like `Connect(id, secret, endpoint string)`.
With a little documentation we could easily add that to the main
repository for others to use.
To view this discussion on the web visit https://groups.google.com/d/msgid/ory-hydra/4c77f57a-be54-434e-9502-dd1e59f3a4cb%40googlegroups.com.
Perfect :) I thought of implementing this in something like https://thrift.apache.org/ and compile the client code for all languages.
If you're interested to look at this, I welcome any help :)
To view this discussion on the web visit https://groups.google.com/d/msgid/ory-hydra/5868789c-05f5-4044-8e85-2baa100a80a3%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ory-hydra/f821bf82-422c-4ad0-9204-71bd20bc5604%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ory-hydra/75dba9aa-97b4-f217-f20d-25e19ad214a2%40serlo.org.
--
You received this message because you are subscribed to the Google Groups "ory-hydra" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ory-hydra+...@googlegroups.com.
To post to this group, send email to ory-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ory-hydra/a90e49ba-7a4c-444f-868d-5cf4c99fd67d%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ory-hydra/ba9bed47-49f3-4f8b-8f49-ecc2f1ccf652%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ory-hydra/2E9B4C7B-C7A3-4C42-88C9-F4778806D36B%40serlo.org.
feel free to create a PR for it :)
To view this discussion on the web visit https://groups.google.com/d/msgid/ory-hydra/8ca94f42-f2cc-4cbf-ab7e-7ca841ba0b23%40googlegroups.com.
why not simply ory-am/hydra/client.go ? i'm not sure if it's
possible to import main packages though.
To view this discussion on the web visit https://groups.google.com/d/msgid/ory-hydra/496c888c-79c3-4328-9eb8-c53939538c5b%40googlegroups.com.
i see,
how about `ory-am/hydra/sdk`?
To view this discussion on the web visit https://groups.google.com/d/msgid/ory-hydra/03344d1a-ef82-4657-a541-62aba4ce017d%40googlegroups.com.