try config handling

This commit is contained in:
Livio Amstutz 2019-11-21 13:56:03 +01:00
parent 7e1d2f0b13
commit 8b0f4438fb
7 changed files with 171 additions and 35 deletions

View file

@ -2,17 +2,25 @@ package main
import (
"context"
"log"
"github.com/caos/oidc/example/internal/mock"
"github.com/caos/oidc/pkg/server"
server "github.com/caos/oidc/pkg/op"
)
func main() {
ctx := context.Background()
config := &server.Config{
Issuer: "test",
Issuer: "http://localhost:9998/",
Port: "9998",
}
storage := &mock.Storage{}
handler := server.NewDefaultHandler(config, storage)
handler, err := server.NewDefaultHandler(config, storage)
if err != nil {
log.Fatal(err)
}
server.Start(ctx, handler)
<-ctx.Done()
}