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)
| 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 |
| 275 | func 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 |
| 280 | func getToken(appURL *url.URL, appInfo *AppInfo, useHostOnly bool, autoClose bool, isFedramp bool, log *zerolog.Logger) (string, error) { |