MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / PluginAuthConfigured

Function PluginAuthConfigured

internal/pluginstore/auth.go:95–110  ·  view source on GitHub ↗
(source Source, plugin Plugin, auth []AuthConfig)

Source from the content-addressed store, hash-verified

93}
94
95func PluginAuthConfigured(source Source, plugin Plugin, auth []AuthConfig) bool {
96 if AuthConfigured(auth, source.URL, RequestKindRegistry) {
97 return true
98 }
99 switch PluginInstallType(plugin) {
100 case InstallTypeDirect:
101 for _, artifact := range PluginArtifacts(plugin) {
102 if AuthConfigured(auth, artifact.URL, RequestKindArtifact) {
103 return true
104 }
105 }
106 case InstallTypeGitHubRelease:
107 return pluginGitHubReleaseAuthConfigured(plugin, auth)
108 }
109 return false
110}
111
112func pluginGitHubReleaseAuthConfigured(plugin Plugin, auth []AuthConfig) bool {
113 owner, repo, errRepository := GitHubRepositoryParts(plugin.Repository)

Calls 4

AuthConfiguredFunction · 0.70
PluginInstallTypeFunction · 0.70
PluginArtifactsFunction · 0.70