MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / RedactBasicAuthURLUserAndPassword

Function RedactBasicAuthURLUserAndPassword

base/util.go:82–89  ·  view source on GitHub ↗

RedactBasicAuthURLUserAndPassword returns the given string, with a redacted HTTP basic auth component.

(ctx context.Context, urlIn string)

Source from the content-addressed store, hash-verified

80
81// RedactBasicAuthURLUserAndPassword returns the given string, with a redacted HTTP basic auth component.
82func RedactBasicAuthURLUserAndPassword(ctx context.Context, urlIn string) string {
83 redactedUrl, err := RedactBasicAuthURL(urlIn, false)
84 if err != nil {
85 WarnfCtx(ctx, "%v", err)
86 return ""
87 }
88 return redactedUrl
89}
90
91// RedactBasicAuthURLPassword returns the given string, with a redacted HTTP basic auth password component.
92func RedactBasicAuthURLPassword(ctx context.Context, urlIn string) string {

Callers 2

SanitizedUrlMethod · 0.92
TestRedactBasicAuthURLFunction · 0.85

Calls 2

RedactBasicAuthURLFunction · 0.85
WarnfCtxFunction · 0.85

Tested by 1

TestRedactBasicAuthURLFunction · 0.68