MCPcopy Create free account
hub / github.com/dropbox/dbxcli / ensureOAuthAppCredentials

Function ensureOAuthAppCredentials

cmd/auth.go:332–350  ·  view source on GitHub ↗
(tokType string)

Source from the content-addressed store, hash-verified

330}
331
332func ensureOAuthAppCredentials(tokType string) error {
333 if !needsOAuthCredentialsOverride(tokType) {
334 return nil
335 }
336
337 creds, err := readAppCredentials(tokType)
338 if err != nil {
339 return err
340 }
341 creds.Key = strings.TrimSpace(creds.Key)
342 if creds.Key == "" {
343 return appKeyRequiredErrorWithDetails("Dropbox app key is required", map[string]any{
344 "token_type": authTokenTypeName(tokType),
345 })
346 }
347
348 setOAuthCredentials(tokType, creds.Key)
349 return nil
350}
351
352func requestAccessToken(tokType string, domain string) (string, error) {
353 credential, err := requestAccessCredential(tokType, domain)

Callers 1

requestAccessCredentialFunction · 0.85

Calls 4

authTokenTypeNameFunction · 0.85
setOAuthCredentialsFunction · 0.85

Tested by

no test coverage detected