Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for FindDefaultCredentials (0.08 sec)

  1. istioctl/pkg/kubeinject/google.go

    	return strings.Contains(addr, ".googleapis.com/") || strings.Contains(addr, ".googleapis.com:443/")
    }
    
    func mcpTransport(ctx context.Context, tr http.RoundTripper) (http.RoundTripper, error) {
    	creds, err := google.FindDefaultCredentials(ctx, "https://www.googleapis.com/auth/cloud-platform")
    	if err != nil {
    		return nil, fmt.Errorf("finding default GCP credentials: %w", err)
    	}
    	return &oauth2.Transport{
    		Base:   tr,
    		Source: creds.TokenSource,
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Thu Jun 15 15:02:17 UTC 2023
    - 1.2K bytes
    - Viewed (0)
Back to top