Skip to content

Commit

Permalink
renaming to skip-auth
Browse files Browse the repository at this point in the history
  • Loading branch information
distractedm1nd committed Jan 22, 2024
1 parent af39f69 commit ba417e8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions nodebuilder/rpc/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ import (
)

type Config struct {
Address string
Port string
AuthDisabled bool
Address string
Port string
SkipAuth bool
}

func DefaultConfig() Config {
return Config{
Address: defaultBindAddress,
// do NOT expose the same port as celestia-core by default so that both can run on the same machine
Port: defaultPort,
AuthDisabled: false,
Port: defaultPort,
SkipAuth: false,
}
}

Expand Down
2 changes: 1 addition & 1 deletion nodebuilder/rpc/constructors.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ func registerEndpoints(
}

func server(cfg *Config, auth jwt.Signer) *rpc.Server {
return rpc.NewServer(cfg.Address, cfg.Port, cfg.AuthDisabled, auth)
return rpc.NewServer(cfg.Address, cfg.Port, cfg.SkipAuth, auth)
}
6 changes: 3 additions & 3 deletions nodebuilder/rpc/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
var (
addrFlag = "rpc.addr"
portFlag = "rpc.port"
authFlag = "rpc.disable-auth"
authFlag = "rpc.skip-auth"
)

// Flags gives a set of hardcoded node/rpc package flags.
Expand All @@ -30,7 +30,7 @@ func Flags() *flag.FlagSet {
flags.Bool(
authFlag,
false,
"Disable authentication for RPC requests",
"Skips authentication for RPC requests",
)

return flags
Expand All @@ -51,6 +51,6 @@ func ParseFlags(cmd *cobra.Command, cfg *Config) {
panic(err)
}
if ok {
cfg.AuthDisabled = true
cfg.SkipAuth = true
}
}

0 comments on commit ba417e8

Please sign in to comment.