Auth Namespace Flag
This commit is contained in:
parent
5494e935f4
commit
d39b723511
@ -271,6 +271,11 @@ var (
|
|||||||
EnvVars: []string{"MICRO_AUTH_SECRET"},
|
EnvVars: []string{"MICRO_AUTH_SECRET"},
|
||||||
Usage: "Account secret used for client authentication",
|
Usage: "Account secret used for client authentication",
|
||||||
},
|
},
|
||||||
|
&cli.StringFlag{
|
||||||
|
Name: "auth_namespace",
|
||||||
|
EnvVars: []string{"MICRO_AUTH_NAMESPACE"},
|
||||||
|
Usage: "Namespace for the services auth account",
|
||||||
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "auth_public_key",
|
Name: "auth_public_key",
|
||||||
EnvVars: []string{"MICRO_AUTH_PUBLIC_KEY"},
|
EnvVars: []string{"MICRO_AUTH_PUBLIC_KEY"},
|
||||||
@ -681,6 +686,10 @@ func (c *cmd) Before(ctx *cli.Context) error {
|
|||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(ctx.String("auth_namespace")) > 0 {
|
||||||
|
authOpts = append(authOpts, auth.Namespace(ctx.String("auth_namespace")))
|
||||||
|
}
|
||||||
|
|
||||||
if len(ctx.String("auth_public_key")) > 0 {
|
if len(ctx.String("auth_public_key")) > 0 {
|
||||||
authOpts = append(authOpts, auth.PublicKey(ctx.String("auth_public_key")))
|
authOpts = append(authOpts, auth.PublicKey(ctx.String("auth_public_key")))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user