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

Method AuthKind

sdk/cliproxy/auth/classification.go:26–43  ·  view source on GitHub ↗

AuthKind returns the credential kind using explicit metadata first and legacy field-shape fallbacks second.

()

Source from the content-addressed store, hash-verified

24// AuthKind returns the credential kind using explicit metadata first and legacy
25// field-shape fallbacks second.
26func (a *Auth) AuthKind() string {
27 if a == nil {
28 return ""
29 }
30 if kind := normalizeAuthKind(authAttribute(a, AttributeAuthKind)); kind != "" {
31 return kind
32 }
33 if kind := normalizeAuthKind(authMetadataString(a, AttributeAuthKind)); kind != "" {
34 return kind
35 }
36 if authAttribute(a, AttributeAPIKey) != "" {
37 return AuthKindAPIKey
38 }
39 if authHasOAuthMetadata(a) {
40 return AuthKindOAuth
41 }
42 return ""
43}
44
45// AuthSourceKind returns where the Auth entry came from at runtime.
46func (a *Auth) AuthSourceKind() string {

Callers 14

AccountInfoMethod · 0.95
resolveUsageAuthTypeFunction · 0.80
nextRefreshCheckAtFunction · 0.80
isAPIKeyAuthFunction · 0.80
executionAliasPoolModelFunction · 0.80
applyAPIKeyModelAliasMethod · 0.80
IsConfigAPIKeyAuthFunction · 0.80

Calls 4

normalizeAuthKindFunction · 0.85
authMetadataStringFunction · 0.85
authHasOAuthMetadataFunction · 0.85
authAttributeFunction · 0.70

Tested by 1

TestAuthKindFunction · 0.64