MCPcopy
hub / github.com/gin-gonic/gin / authorizationHeader

Function authorizationHeader

auth.go:91–94  ·  view source on GitHub ↗
(user, password string)

Source from the content-addressed store, hash-verified

89}
90
91func authorizationHeader(user, password string) string {
92 base := user + ":" + password
93 return "Basic " + base64.StdEncoding.EncodeToString(bytesconv.StringToBytes(base))
94}
95
96// BasicAuthForProxy returns a Basic HTTP Proxy-Authorization middleware.
97// If the realm is empty, "Proxy Authorization Required" will be used by default.

Callers 5

processAccountsFunction · 0.85
TestBasicAuthSucceedFunction · 0.85

Calls 1

StringToBytesFunction · 0.92

Tested by 4

TestBasicAuthSucceedFunction · 0.68