MCPcopy Index your code
hub / github.com/cloudflare/cloudflared / GenerateSSHCertFilePathFromURL

Function GenerateSSHCertFilePathFromURL

token/path.go:16–23  ·  view source on GitHub ↗

GenerateSSHCertFilePathFromURL will return a file path for creating short lived certificates

(url *url.URL, suffix string)

Source from the content-addressed store, hash-verified

14
15// GenerateSSHCertFilePathFromURL will return a file path for creating short lived certificates
16func GenerateSSHCertFilePathFromURL(url *url.URL, suffix string) (string, error) {
17 configPath, err := getConfigPath()
18 if err != nil {
19 return "", err
20 }
21 name := strings.Replace(fmt.Sprintf("%s%s-%s", url.Hostname(), url.EscapedPath(), suffix), "/", "-", -1)
22 return filepath.Join(configPath, name), nil
23}
24
25// GenerateAppTokenFilePathFromURL will return a filepath for given Access org token
26func GenerateAppTokenFilePathFromURL(appDomain, aud string, suffix string) (string, error) {

Callers

nothing calls this directly

Calls 2

getConfigPathFunction · 0.85
HostnameMethod · 0.45

Tested by

no test coverage detected