Skip to content

Commit

Permalink
chore:removed enabled flag
Browse files Browse the repository at this point in the history
  • Loading branch information
hareshkainthmethods committed Oct 4, 2022
1 parent 55a9bd0 commit ae72bc8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
1 change: 0 additions & 1 deletion authorisation/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ type Config struct {
// NewDefaultConfig populates the config struct with default values suitable for local development.
func NewDefaultConfig() *Config {
return &Config{
Enabled: true,
JWTVerificationPublicKeys: map[string]string{"NeKb65194Jo=": "MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA0TpTemKodQNChMNj1f/NF19nMAbjKbwRENSKujO5iwXLIt0hCjh5dz4egKQo7KEr2ex3qdy50LWKD871gRfAgDoRD5/1kUUVqII5K09IDCVY/EohukrI+Uep/Z5ymPNPXXD1yJvBx/YmmuMGUAT5UKHKBCP+FcoAxYAKcaKhtL0iyVjhtD0Y4V8gcQnQq3bOYhF4FEHoHBNh23AKcJM1VvNVtSHViMuTOzsFLHAgy2lLsRLnxtXovEovAiTay+Sn1FuDOq2gswl2Uujh1GO8kfkXE1gNRn/l7RUYIRrql8kROHMSYvPBAIqYhGSWOG3JX1oFlI1erYaeIPI4l4Qj/P+YSnrRx0di3vy6ZDAnhs8kdZP81F+3rFrNUNIOVFBRKscMnvOH4HO4f9PpXynde5xTlVvqdgXVlWkxGgQk0d323ka8fPY1xsmxV99idmmgmfglPOeLxuOkFxfXJSpbP/kn9AEyKBcF2BImfc12uvdSn46zZ1f/8nvzQ9naruwEtho4t6cIb7A+5KxVAILCQHvm3xIxfxMy5RFIeR7T3KhW2URDtiGMKuEE44EQwtxXxnMUdmvBUyHg2iQ54ELD4uVVVkGZkT5cTIf8iwfWI808B+CE5T8I3YrK7DiaVkJqTWX9LqWqetwHQxY48iTN+nPguHQ6dkZwmxuWBEuQ9eECAwEAAQ=="},
PermissionsAPIURL: "http://localhost:25400",
ZebedeeURL: "http://localhost:8082",
Expand Down
4 changes: 0 additions & 4 deletions authorisation/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ type GetAttributesFromRequest func(req *http.Request) (attributes map[string]str
// NewFeatureFlaggedMiddleware returns a different Middleware implementation depending on the configured feature flag value
// Use this constructor when first adding authorisation as middleware so that it can be toggled off if required.
func NewFeatureFlaggedMiddleware(ctx context.Context, config *Config, jwtRSAPublicKeys map[string]string) (Middleware, error) {
if config.Enabled {
return NewMiddlewareFromConfig(ctx, config, jwtRSAPublicKeys)
}

return NewNoopMiddleware(), nil
}

Expand Down

0 comments on commit ae72bc8

Please sign in to comment.