@@ -43,10 +43,9 @@ For more information on how these work (and how to implement
43
43
executable-sourced credentials), please check out:
44
44
https://cloud.google.com/iam/docs/workload-identity-federation-with-other-providers#create_a_credential_configuration
45
45
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
50
49
Cloud resources. For instance, you can create a NewClient from thes
51
50
[cloud.google.com/go/storage] package and pass in option.WithTokenSource(yourTokenSource))
52
51
@@ -93,11 +92,10 @@ For more information on how these work (and how to implement
93
92
executable-sourced credentials), please check out:
94
93
https://cloud.google.com/iam/docs/workforce-obtaining-short-lived-credentials#generate_a_configuration_file_for_non-interactive_sign-in
95
94
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
101
99
[cloud.google.com/go/storage] package and pass in option.WithTokenSource(yourTokenSource))
102
100
103
101
# Security considerations
0 commit comments