Skip to content

Commit

Permalink
add authentication features to n0core, but user API, auth API and aut…
Browse files Browse the repository at this point in the history
…h provider are cycling depending
  • Loading branch information
h-otter committed Oct 1, 2019
1 parent 1829d17 commit 29559c1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 7 additions & 1 deletion n0core/cmd/n0core/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,13 @@ func ServeAPI(cctx *cli.Context) error {
}
defer ds.Close()

userapi := user.CreateUserAPI(ds)
// listen := cctx.String("listen-url")
// auth, err := auth.NewAuthenticationServiceProvider(context.Background(), conn, listen)
// if err != nil {
// return err
// }

userapi := user.CreateUserAPI(ds, auth)
userClient := piam.NewUserServiceClient(conn)

secret := cctx.String("token-secret")
Expand Down
3 changes: 3 additions & 0 deletions n0core/cmd/n0core/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ func main() {
cli.StringFlag{
Name: "token-secret",
},
cli.StringFlag{
Name: "listen-url",
},
},
},
{
Expand Down

0 comments on commit 29559c1

Please sign in to comment.