|
|
|
@ -88,7 +88,7 @@ func main() {
|
|
|
|
|
log.Fatalf("OpenID Connect discovery failed: %s", err)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sessionPath, sessionAuthKey, sessionEncKey := configureSessionParameters(config, err)
|
|
|
|
|
sessionPath, sessionAuthKey, sessionEncKey := configureSessionParameters(config)
|
|
|
|
|
services.InitSessionStore(logger, sessionPath, sessionAuthKey, sessionEncKey)
|
|
|
|
|
|
|
|
|
|
authMiddleware := handlers.Authenticate(ctx, logger, oidcClientId)
|
|
|
|
@ -144,7 +144,7 @@ func main() {
|
|
|
|
|
handlers.StartApplication(logger, ctx, server, config)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func configureSessionParameters(config *koanf.Koanf, err error) (string, []byte, []byte) {
|
|
|
|
|
func configureSessionParameters(config *koanf.Koanf) (string, []byte, []byte) {
|
|
|
|
|
sessionPath := config.MustString("session.path")
|
|
|
|
|
sessionAuthKey, err := base64.StdEncoding.DecodeString(config.String("session.auth-key"))
|
|
|
|
|
if err != nil {
|
|
|
|
|