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

Function IsConfigAPIKeyAuth

sdk/cliproxy/auth/config_apikey.go:4–15  ·  view source on GitHub ↗

IsConfigAPIKeyAuth reports whether the auth entry is synthesized from config *-api-key lists.

(auth *Auth)

Source from the content-addressed store, hash-verified

2
3// IsConfigAPIKeyAuth reports whether the auth entry is synthesized from config *-api-key lists.
4func IsConfigAPIKeyAuth(auth *Auth) bool {
5 if auth == nil {
6 return false
7 }
8 if auth.AuthKind() != AuthKindAPIKey {
9 return false
10 }
11 if auth.AuthSourceKind() != AuthSourceConfig {
12 return false
13 }
14 return authAttribute(auth, AttributeAPIKey) != ""
15}

Callers 2

persistMethod · 0.85
TestIsConfigAPIKeyAuthFunction · 0.85

Calls 3

AuthKindMethod · 0.80
AuthSourceKindMethod · 0.80
authAttributeFunction · 0.70

Tested by 1

TestIsConfigAPIKeyAuthFunction · 0.68