MCPcopy Create free account
hub / github.com/openclaw/gogcli / fetchAuthIdentity

Function fetchAuthIdentity

internal/cmd/auth.go:48–59  ·  view source on GitHub ↗
(
	ctx context.Context,
	client string,
	refreshToken string,
	scopes []string,
	timeout time.Duration,
)

Source from the content-addressed store, hash-verified

46}
47
48func fetchAuthIdentity(
49 ctx context.Context,
50 client string,
51 refreshToken string,
52 scopes []string,
53 timeout time.Duration,
54) (googleauth.Identity, error) {
55 if runtime, ok := app.FromContext(ctx); ok && runtime.Auth.FetchAuthorizedIdentity != nil {
56 return runtime.Auth.FetchAuthorizedIdentity(ctx, client, refreshToken, scopes, timeout)
57 }
58 return googleauth.Identity{}, fmt.Errorf("%w: authorized identity", errRuntimeServiceRequired)
59}
60
61func ensureKeychainAccessIfNeeded(ctx context.Context) error {
62 backendInfo, err := resolveKeyringBackendInfo(ctx)

Callers 2

RunMethod · 0.85

Calls 2

FromContextFunction · 0.92
ErrorfMethod · 0.80