diff --git a/pkg/config/config.go b/pkg/config/config.go index cbce72b..e598458 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -15,24 +15,24 @@ type Config struct { } type IDPorten struct { - ClientID string `json:"client-id"` - ClientJWK string `json:"client-jwk"` - RedirectURI string `json:"redirect-uri"` - WellKnownURL string `json:"well-known-url"` - WellKnown IDPortenWellKnown `json:"well-known"` - Locale string `json:"locale"` - SecurityLevel string `json:"security-level"` + ClientID string `json:"client-id"` + ClientJWK string `json:"client-jwk"` + RedirectURI string `json:"redirect-uri"` + WellKnownURL string `json:"well-known-url"` + WellKnown IDPortenWellKnown `json:"well-known"` + Locale string `json:"locale"` + SecurityLevel string `json:"security-level"` } const ( - BindAddress = "bind-address" - LogFormat = "log-format" - LogLevel = "log-level" - IDPortenClientID = "idporten.client-id" - IDPortenClientJWK = "idporten.client-jwk" - IDPortenRedirectURI = "idporten.redirect-uri" - IDPortenWellKnownURL = "idporten.well-known-url" - IDPortenLocale = "idporten.locale" + BindAddress = "bind-address" + LogFormat = "log-format" + LogLevel = "log-level" + IDPortenClientID = "idporten.client-id" + IDPortenClientJWK = "idporten.client-jwk" + IDPortenRedirectURI = "idporten.redirect-uri" + IDPortenWellKnownURL = "idporten.well-known-url" + IDPortenLocale = "idporten.locale" IDPortenSecurityLevel = "idporten.security-level" ) diff --git a/pkg/router/router.go b/pkg/router/router.go index eebf8c2..c65812f 100644 --- a/pkg/router/router.go +++ b/pkg/router/router.go @@ -38,6 +38,7 @@ func (h *Handler) Login(w http.ResponseWriter, r *http.Request) { randomUUID2, err := uuid.NewRandom() if err != nil { http.Error(w, "failed to create nonce: "+err.Error(), http.StatusUnauthorized) + return } nonce := randomUUID2.String()