Skip to content

Commit 74e6f6e

Browse files
committed
update docs
1 parent 7023750 commit 74e6f6e

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

google/externalaccount/basecredentials.go

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,9 @@ For more information on how these work (and how to implement
4343
executable-sourced credentials), please check out:
4444
https://cloud.google.com/iam/docs/workload-identity-federation-with-other-providers#create_a_credential_configuration
4545
46-
For using a custom function to supply the token, define a function that can return
47-
either a token string (for OIDC/SAML providers), or one that returns an [AwsSecurityCredentials]
48-
(for AWS providers). This function can then be used when building an [Config].
49-
The [golang.org/x/oauth2.TokenSource] created from the config can then be used access Google
46+
To use a custom function to supply the token, define a struct that implements the [SubjectTokenSupplier] interface for OIDC/SAML providers,
47+
or one that implements [AwsSecurityCredentialsSupplier] for AWS providers. This can then be used when building a [Config].
48+
The [golang.org/x/oauth2.TokenSource] created from the config using [NewTokenSource] can then be used access Google
5049
Cloud resources. For instance, you can create a NewClient from thes
5150
[cloud.google.com/go/storage] package and pass in option.WithTokenSource(yourTokenSource))
5251
@@ -93,11 +92,10 @@ For more information on how these work (and how to implement
9392
executable-sourced credentials), please check out:
9493
https://cloud.google.com/iam/docs/workforce-obtaining-short-lived-credentials#generate_a_configuration_file_for_non-interactive_sign-in
9594
96-
For using a user defined function to supply the token, define a function that can return
97-
either a token string (for OIDC/SAML providers), or one that returns an [AwsSecurityCredentials]
98-
for AWS providers. This function can then be used when building an [Config].
99-
The [golang.org/x/oauth2.TokenSource] created from the config can then be used access Google
100-
Cloud resources. For instance, you can create a NewClient from the
95+
To use a custom function to supply the token, define a struct that implements the [SubjectTokenSupplier] interface for OIDC/SAML providers.
96+
This can then be used when building a [Config].
97+
The [golang.org/x/oauth2.TokenSource] created from the config using [NewTokenSource] can then be used access Google
98+
Cloud resources. For instance, you can create a NewClient from thes
10199
[cloud.google.com/go/storage] package and pass in option.WithTokenSource(yourTokenSource))
102100
103101
# Security considerations

0 commit comments

Comments
 (0)