try config handling
This commit is contained in:
parent
7e1d2f0b13
commit
8b0f4438fb
7 changed files with 171 additions and 35 deletions
|
@ -14,9 +14,10 @@ replace github.com/caos/oidc/pkg/utils => /Users/livio/workspaces/go/src/github.
|
|||
|
||||
require (
|
||||
github.com/caos/oidc/pkg/oidc v0.0.0-00010101000000-000000000000
|
||||
github.com/caos/oidc/pkg/op v0.0.0-00010101000000-000000000000 // indirect
|
||||
github.com/caos/oidc/pkg/op v0.0.0-00010101000000-000000000000
|
||||
github.com/caos/oidc/pkg/rp v0.0.0-00010101000000-000000000000
|
||||
github.com/caos/oidc/pkg/utils v0.0.0-00010101000000-000000000000
|
||||
github.com/caos/utils/logging v0.0.0-20191104132131-b318678afbef
|
||||
github.com/google/uuid v1.1.1
|
||||
golang.org/x/crypto v0.0.0-20191117063200-497ca9f6d64f
|
||||
)
|
||||
|
|
|
@ -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