@@ -230,9 +230,9 @@ func FindMasterCredentialsNameFor(profileName string, keyring *CredentialKeyring
230230}
231231
232232type tempCredsCreator struct {
233- // UseSession will disable the use of GetSessionToken when set to false
234- UseSession bool
235- Keyring * CredentialKeyring
233+ // DisableSessions will disable the use of GetSessionToken when set to true
234+ DisableSessions bool
235+ Keyring * CredentialKeyring
236236
237237 chainedMfa string
238238}
@@ -303,7 +303,7 @@ func (t *tempCredsCreator) GetProviderForProfile(config *ProfileConfig) (aws.Cre
303303
304304// canUseGetSessionToken determines if GetSessionToken should be used, and if not returns a reason
305305func (t * tempCredsCreator ) canUseGetSessionToken (c * ProfileConfig ) (bool , string ) {
306- if ! t . UseSession {
306+ if t . DisableSessions {
307307 return false , "sessions are disabled"
308308 }
309309
@@ -339,10 +339,10 @@ func mfaDetails(mfaChained bool, config *ProfileConfig) string {
339339}
340340
341341// NewTempCredentialsProvider creates a credential provider for the given config
342- func NewTempCredentialsProvider (config * ProfileConfig , keyring * CredentialKeyring , useSession bool ) (aws.CredentialsProvider , error ) {
342+ func NewTempCredentialsProvider (config * ProfileConfig , keyring * CredentialKeyring , disableSessions bool ) (aws.CredentialsProvider , error ) {
343343 t := tempCredsCreator {
344- Keyring : keyring ,
345- UseSession : useSession ,
344+ Keyring : keyring ,
345+ DisableSessions : disableSessions ,
346346 }
347347 return t .GetProviderForProfile (config )
348348}
0 commit comments