The Central Go Modules Repository

To use GoCenter:
export GOPROXY=https://gocenter.io
0
Stars
UNKNOWN
License
3
Downloads
January 1st 0001
Last Modified
Version:
Loading...

dex-consumer

What is this repository for?

This is a library to simplify they way Engineering Services consume dex openid connect

How do I use this library

Start by initalizing the dexconsumer:

import (
    "bitbucket.org/bestsellerit/dex-consumer"
    dexconfig "bitbucket.org/bestsellerit/dex-consumer/config"
)

func main() {
    ourConfig := dexconfig.DexConfig{
		ClientID:        config.Config.ClientID,
		ProviderURL:     config.Config.ProviderURL,
		Whitelist:       config.Config.Whitelist,
		InsecureSkipTLS: config.Config.InsecureSkipTLS,
		CaCertPath:      config.Config.CaCertPath,
	}

	dexconsumer.Process(ourConfig)
}

If you are using mux then you can use it like this:

import tm "bitbucket.org/bestsellerit/dex-consumer/tokenmiddleware"

router.Handle("/", tm.TokenMiddleware(http.HandlerFunc(someFunc))).Methods("POST")

To-do

* Add CI/CD to test the library