feat(auth): 登录注册 - 添加短信通知与组合验证支持
This commit is contained in:
1 parent
6c013ebf7e
commit
bc0d109428
55 files changed
+4013
-103
No files matched your search
@@ -243,6 +243,13 @@ func loadDeclarativeManifestProvider(manifest Manifest, index int) (Adapter, err
|
||||
}
|
||||
|
||||
func ValidateManifest(manifest Manifest) error {
|
||||
seenSMS := map[string]bool{}
|
||||
for _, provider := range manifest.Contributes.SMSProviders {
|
||||
if !validManifestIdentifier(provider.ID) || strings.TrimSpace(provider.Label) == "" || seenSMS[provider.ID] {
|
||||
return fmt.Errorf("invalid or duplicate SMS provider contribution")
|
||||
}
|
||||
seenSMS[provider.ID] = true
|
||||
}
|
||||
if version := strings.TrimSpace(manifest.APIVersion); version != "yingce.plugin/v1" && version != "yingce.plugin/v2" {
|
||||
return fmt.Errorf("unsupported protocol manifest apiVersion %q", manifest.APIVersion)
|
||||
}
|
||||
@@ -402,6 +409,9 @@ func normalizeManifestForProvider(manifest *Manifest, index int) error {
|
||||
}
|
||||
|
||||
func hasNonProviderContribution(contributes ManifestContributions) bool {
|
||||
if len(contributes.SMSProviders) > 0 {
|
||||
return true
|
||||
}
|
||||
return len(contributes.PaymentProviders) > 0 || len(contributes.Workflows) > 0 || len(contributes.CanvasNodes) > 0 || len(contributes.Transforms) > 0 || len(contributes.Commands) > 0 || len(contributes.AssetSources) > 0 || len(contributes.UsageObservers) > 0 || len(contributes.AICapabilities) > 0 || len(contributes.Agents) > 0 || len(contributes.ImportExport) > 0
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user