You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: codegen/aws-sdk-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/customization/EnvironmentBearerTokenCustomization.kt
+22-51Lines changed: 22 additions & 51 deletions
Original file line number
Diff line number
Diff line change
@@ -71,59 +71,30 @@ class EnvironmentBearerTokenCustomization : KotlinIntegration {
71
71
val signingServiceName =AwsSignatureVersion4.signingServiceName(serviceShape)
72
72
// Transform signing name to environment variable name
73
73
val envVarName ="AWS_BEARER_TOKEN_"+ signingServiceName.replace("""[-\s]""".toRegex(), "_").uppercase()
74
+
val authSchemeId =RuntimeTypes.Auth.Identity.AuthSchemeId
74
75
75
-
writer.apply {
76
-
withBlock(
77
-
"internal fun finalize#LEnvironmentBearerTokenConfig(",
78
-
")",
79
-
serviceName,
80
-
) {
81
-
write(
82
-
"builder: #T.Builder,",
83
-
serviceSymbol,
84
-
)
85
-
write(
86
-
"provider: #1T = #1T.System",
87
-
RuntimeTypes.Core.Utils.PlatformProvider,
88
-
)
89
-
}
90
-
withBlock("{", "}") {
91
-
// The customization do nothing if environment variable is not set
92
-
withBlock(
93
-
"if (provider.getenv(#S) != null) {",
94
-
"}",
95
-
envVarName,
96
-
) {
97
-
// Configure auth scheme preference if customer hasn't specify one
0 commit comments