-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Support disable flag for mediatype validator #675
feat: Support disable flag for mediatype validator #675
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
internal/config/config.go
Outdated
@@ -634,6 +644,11 @@ func checkEnvVars(ctx context.Context, cfg *Configuration) { | |||
cfg.AutoPublishingToOnChainRHS = common.ToPointer(true) | |||
} | |||
|
|||
if cfg.MediaTypeManager.StrictMode == nil { | |||
log.Info(ctx, "ISSUER_MEDIA_TYPE_MANAGER_STRICT_MODE is missing and the server set up it as true") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
server set up it as true? how is that possible? why do we need it? default value, which can be overwritten by config. You will need then always to set it? That's not a plan. Now I even don't know why we need both enabled and strict mode
pkg/protocol/verify.go
Outdated
// bytePubsig, err := json.Marshal(pubsignals) | ||
// if err != nil { | ||
// return err | ||
// } | ||
|
||
// authPubSignals := circuits.AuthV2PubSignals{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you need to comment everything???
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
miss this. sorry. I did some tests yesterday.
@@ -201,6 +202,11 @@ type APIUIAuth struct { | |||
Password string `mapstructure:"Password" tip:"Server UI API Basic auth password"` | |||
} | |||
|
|||
// MediaTypeManager enables or disables the media types manager | |||
type MediaTypeManager struct { | |||
Enabled *bool `mapstructure:"Enabled" tip:"Enable or disable the media type manager"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update .env file sample, please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -51,6 +51,7 @@ type Configuration struct { | |||
CredentialStatus CredentialStatus `mapstructure:"CredentialStatus"` | |||
CustomDIDMethods []CustomDIDMethods `mapstructure:"-"` | |||
AutoPublishingToOnChainRHS *bool `mapstructure:"AutoPublishingToOnChainRHS"` | |||
MediaTypeManager MediaTypeManager `mapstructure:"MediaTypeManager"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update env file sample, please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
&merkletree.HashZero, | ||
&merkletree.HashZero, | ||
}, | ||
if len(rhsPublishers) > 0 && !(rhsMode == reverse_hash.RHSModeOnChain && !i.autoPublishingToOnChainRHS) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be documented in the readme or in a good document in notion
No description provided.