MCPcopy Index your code
hub / github.com/chainreactors/EvilProxy / storageJSONFromAuth

Function storageJSONFromAuth

internal/pluginhost/adapters.go:2067–2082  ·  view source on GitHub ↗
(auth *coreauth.Auth)

Source from the content-addressed store, hash-verified

2065}
2066
2067func storageJSONFromAuth(auth *coreauth.Auth) []byte {
2068 if auth == nil {
2069 return nil
2070 }
2071 if rawProvider, okRaw := auth.Storage.(interface{ RawJSON() []byte }); okRaw {
2072 return bytes.Clone(rawProvider.RawJSON())
2073 }
2074 if len(auth.Metadata) == 0 {
2075 return nil
2076 }
2077 data, errMarshal := json.Marshal(auth.Metadata)
2078 if errMarshal != nil {
2079 return nil
2080 }
2081 return data
2082}
2083
2084func authAttributes(auth *coreauth.Auth) map[string]string {
2085 if auth == nil {

Callers 6

authDataWithDefaultsFunction · 0.85
callModelsForAuthMethod · 0.85
RefreshMethod · 0.85
HttpRequestMethod · 0.85
buildExecutorRequestFunction · 0.85
RefreshAuthMethod · 0.85

Calls 2

CloneMethod · 0.45
RawJSONMethod · 0.45

Tested by

no test coverage detected