packaging and much more

This commit is contained in:
Livio Amstutz 2019-11-29 13:31:55 +01:00
parent 988a556fa9
commit 201109f9c2
29 changed files with 356 additions and 272 deletions

View file

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