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

Function GenerateAppTokenFilePathFromURL

token/path.go:26–34  ·  view source on GitHub ↗

GenerateAppTokenFilePathFromURL will return a filepath for given Access org token

(appDomain, aud string, suffix string)

Source from the content-addressed store, hash-verified

24
25// GenerateAppTokenFilePathFromURL will return a filepath for given Access org token
26func GenerateAppTokenFilePathFromURL(appDomain, aud string, suffix string) (string, error) {
27 configPath, err := getConfigPath()
28 if err != nil {
29 return "", err
30 }
31 name := fmt.Sprintf("%s-%s-%s", appDomain, aud, suffix)
32 name = strings.Replace(strings.Replace(name, "/", "-", -1), "*", "-", -1)
33 return filepath.Join(configPath, name), nil
34}
35
36// generateOrgTokenFilePathFromURL will return a filepath for given Access application token
37func generateOrgTokenFilePathFromURL(authDomain string) (string, error) {

Callers 3

getTokenFunction · 0.85
GetAppTokenIfExistsFunction · 0.85
RemoveTokenIfExistsFunction · 0.85

Calls 1

getConfigPathFunction · 0.85

Tested by

no test coverage detected