MCPcopy
hub / github.com/cloudflare/cloudflared / FetchToken

Function FetchToken

token/token.go:275–277  ·  view source on GitHub ↗

FetchToken will either load a stored token or generate a new one it appends the host of the appURL as the redirect URL to the access cli request if opening the browser

(appURL *url.URL, appInfo *AppInfo, autoClose bool, isFedramp bool, log *zerolog.Logger)

Source from the content-addressed store, hash-verified

273// FetchToken will either load a stored token or generate a new one
274// it appends the host of the appURL as the redirect URL to the access cli request if opening the browser
275func FetchToken(appURL *url.URL, appInfo *AppInfo, autoClose bool, isFedramp bool, log *zerolog.Logger) (string, error) {
276 return getToken(appURL, appInfo, true, autoClose, isFedramp, log)
277}
278
279// getToken will either load a stored token or generate a new one
280func getToken(appURL *url.URL, appInfo *AppInfo, useHostOnly bool, autoClose bool, isFedramp bool, log *zerolog.Logger) (string, error) {

Callers 1

curlFunction · 0.92

Calls 1

getTokenFunction · 0.85

Tested by

no test coverage detected