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

Function parsePluginFileAuths

internal/watcher/synthesizer/file.go:214–226  ·  view source on GitHub ↗
(parser PluginAuthParser, req pluginapi.AuthParseRequest)

Source from the content-addressed store, hash-verified

212}
213
214func parsePluginFileAuths(parser PluginAuthParser, req pluginapi.AuthParseRequest) ([]*coreauth.Auth, bool, error) {
215 if parser == nil {
216 return nil, false, nil
217 }
218 if multiParser, ok := parser.(PluginMultiAuthParser); ok {
219 return multiParser.ParseAuths(context.Background(), req)
220 }
221 auth, handled, errParse := parser.ParseAuth(context.Background(), req)
222 if errParse != nil || !handled || auth == nil {
223 return nil, handled, errParse
224 }
225 return []*coreauth.Auth{auth}, true, nil
226}
227
228func compactPluginAuths(auths []*coreauth.Auth) []*coreauth.Auth {
229 if len(auths) == 0 {

Callers 1

synthesizeFileAuthsFunction · 0.85

Calls 2

ParseAuthsMethod · 0.65
ParseAuthMethod · 0.65

Tested by

no test coverage detected