Skip to content

Commit

Permalink
Merge pull request #27 from infobloxopen/authorizerOpts
Browse files Browse the repository at this point in the history
authorizor options were being ignored
  • Loading branch information
daniel-garcia authored Jun 16, 2023
2 parents 538f3d7 + 657a067 commit d191e93
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion grpc_opa/server_interceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,13 @@ func NewDefaultConfig(application string, opts ...Option) *Config {
opt(cfg)
}

opts = append([]Option{WithOpaClienter(opa_client.New(cfg.address, opa_client.WithHTTPClient(cfg.httpCli)))}, opts...)

authorizer := NewDefaultAuthorizer(application, opts...)

if cfg.authorizer == nil {
logrus.Info("authorizers empty, using default authorizer")
cfg.authorizer = []Authorizer{NewDefaultAuthorizer(application, opts...)}
cfg.authorizer = []Authorizer{authorizer}
}

return cfg
Expand Down

0 comments on commit d191e93

Please sign in to comment.