try config handling
This commit is contained in:
parent
7e1d2f0b13
commit
8b0f4438fb
7 changed files with 171 additions and 35 deletions
|
@ -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()
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue