Home / Function/ searchCredential() — gin Function Reference

searchCredential() — gin Function Reference

Architecture documentation for the searchCredential() function in auth.go from the gin codebase.

Entity Profile

Dependency Diagram

graph TD
  12c00ed5_b5c2_0171_2729_3ff6e12efb0f["searchCredential()"]
  9c86e2a9_4c6a_8db8_8685_d4c53bd42628["BasicAuthForRealm()"]
  9c86e2a9_4c6a_8db8_8685_d4c53bd42628 -->|calls| 12c00ed5_b5c2_0171_2729_3ff6e12efb0f
  30980521_1bd7_5c49_80b3_a997ebd13429["BasicAuthForProxy()"]
  30980521_1bd7_5c49_80b3_a997ebd13429 -->|calls| 12c00ed5_b5c2_0171_2729_3ff6e12efb0f
  style 12c00ed5_b5c2_0171_2729_3ff6e12efb0f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

auth.go lines 32–42

func (a authPairs) searchCredential(authValue string) (string, bool) {
	if authValue == "" {
		return "", false
	}
	for _, pair := range a {
		if subtle.ConstantTimeCompare(bytesconv.StringToBytes(pair.value), bytesconv.StringToBytes(authValue)) == 1 {
			return pair.user, true
		}
	}
	return "", false
}

Domain

Subdomains

Frequently Asked Questions

What does searchCredential() do?
searchCredential() is a function in the gin codebase.
What calls searchCredential()?
searchCredential() is called by 2 function(s): BasicAuthForProxy, BasicAuthForRealm.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free