golang.org/x/oauth2@v0.18.0/google/externalaccount/programmaticrefreshcredsource.go (about) 1 // Copyright 2024 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package externalaccount 6 7 import "context" 8 9 type programmaticRefreshCredentialSource struct { 10 supplierOptions SupplierOptions 11 subjectTokenSupplier SubjectTokenSupplier 12 ctx context.Context 13 } 14 15 func (cs programmaticRefreshCredentialSource) credentialSourceType() string { 16 return "programmatic" 17 } 18 19 func (cs programmaticRefreshCredentialSource) subjectToken() (string, error) { 20 return cs.subjectTokenSupplier.SubjectToken(cs.ctx, cs.supplierOptions) 21 }