[keycloak-dev] GoLang Adapter

Thomas Darimont thomas.darimont at googlemail.com
Wed May 10 13:43:34 EDT 2017


Hi folks,

another option for using Keycloak with go is the 'goth' library which
integrates
with multiple auth providers.

https://github.com/markbates/goth

To run the example app with Keycloak one simply needs to
build the example and run it with:

# client id
export OPENID_CONNECT_KEY=goth-demo
# client secret
export OPENID_CONNECT_SECRET=efb3f804-811d-411e-af66-a34f8d5cc02c
export OPENID_CONNECT_DISCOVERY_URL=
http://localhost:8081/auth/realms/golang-goth-demo/.well-known/openid-configuration

./example

The OIDC specific stuff is implemented here:
https://github.com/markbates/goth/tree/master/providers/openidConnect

Cheers,
Thomas

2017-05-10 11:56 GMT+02:00 Sebastien Blanc <sblanc at redhat.com>:

> Tony, glad I could convince you ;)
>
> As Bill said, taking as base an existing Go OIDC lib is the easiest to get
> into it. Blog post like this one from our "competitor" ;)
> https://auth0.com/blog/authentication-in-golang/ could also help
>
> Regarding the adapter blueprint,  I started this document here
> https://docs.google.com/a/redhat.com/spreadsheets/d/
> 13muhHORqIF11UeNbZIbbBzlh3FCef5BwKj2G2exLbYM/edit?usp=sharing
>
> On Mon, May 8, 2017 at 8:28 AM, Stian Thorgersen <sthorger at redhat.com>
> wrote:
>
> > Sebastien is planning to create a blueprint of adapters including test
> > coverage. That would probably be very useful when creating a new adapter.
> >
> > On 5 May 2017 at 20:34, Bill Burke <bburke at redhat.com> wrote:
> >
> >> https://github.com/coreos/go-oidc  might be a good start?
> >>
> >> You could expand it to make sure it understands our access token format
> >> (i.e.roles) and can handle our extensions (backchannel logut and other
> >> events, the CORS support we have in other adapters, etc...)
> >>
> >> Then we'd probably create a repo for you once its ready, or we can do
> >> that right away too, up to you.
> >>
> >>
> >>
> >> On 5/5/17 1:38 PM, Tony Winters wrote:
> >> > I was just at the RedHat Summit this week and during the Keycloak
> >> session, it was mentioned that there wasn’t a GoLang adapter yet. I’d be
> >> interested in tackling this if there is a need. What is the process to
> get
> >> this started? We actually have an application written in GoLang that
> will
> >> need to be secured once we go live with Keycloak company wide (scheduled
> >> go-live within the next several months).
> >> >
> >> > Tony Winters
> >> > _______________________________________________
> >> > keycloak-dev mailing list
> >> > keycloak-dev at lists.jboss.org
> >> > https://lists.jboss.org/mailman/listinfo/keycloak-dev
> >>
> >> _______________________________________________
> >> keycloak-dev mailing list
> >> keycloak-dev at lists.jboss.org
> >> https://lists.jboss.org/mailman/listinfo/keycloak-dev
> >>
> >
> >
> _______________________________________________
> keycloak-dev mailing list
> keycloak-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-dev
>


More information about the keycloak-dev mailing list