func main() {
	http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
	app := iris.New()
	app.RegisterView(iris.HTML("./templates", ".html"))
	app.Get("/", getIndex)
	app.Get("/consent", getConsent)
	app.Post("/consent", postConsent)
	app.Get("/login", getLogin)
	app.Post("/login", postLogin)
	app.Get("/logout", getLogout)
	app.Run(iris.Addr("localhost:8080"))
}
main is the entrypoint for the consent application
package main
import (
	"bytes"
	"crypto/tls"
	"encoding/json"
	"io/ioutil"
	"net/http"
	"net/url"
	"os"
	"strings"
	"time"
	"github.com/kataras/iris/v12"
	"github.com/kataras/iris/v12/sessions"
)
var (
	demoClientID           = os.Getenv("DEMO_CLIENT_ID")
	kongAdminEndpoint      = os.Getenv("KONG_ADMIN_ENDPOINT")
	kongProxyEndpoint      = os.Getenv("KONG_PROXY_ENDPOINT")
	apiPath                = os.Getenv("API_PATH")
	provisionKey           = os.Getenv("PROVISION_KEY")
	cookieNameForSessionID = "kongOAuthConsentApp"
	sess                   = sessions.New(sessions.Config{Cookie: cookieNameForSessionID})
	userAgent              = "kong-oauth2-consent-app"
)
type Credentials struct {
	Username string
	Password string
}
type ConsentRequest struct {
	ClientID     string
	ResponseType string
	Scopes       string
}
type OAuth2Credential struct {
	ApplicationName string `json:"name"`
}
type OAuth2Credentials struct {
	Data []OAuth2Credential `json:"data"`
}
type AuthorizeResponse struct {
	RedirectURI string `json:"redirect_uri"`
}