Skip to content

Commit

Permalink
Merge pull request #1168 from sgayangi/sgayangi-committership-fixes
Browse files Browse the repository at this point in the history
[APK] Fix formatting issues in APK transformer
  • Loading branch information
CrowleyRajapakse authored Jun 18, 2024
2 parents 076794f + fda8086 commit 12813c2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions apim-apk-agent/pkg/transformer/transformer.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,9 @@ func GenerateAPKConf(APIJson string, certArtifact CertificateArtifact, organizat
certAvailable = true
}

authConfigList := mapAuthConfigs(apiYamlData.ID, apiYamlData.AuthorizationHeader, apiYamlData.APIKeyHeader, apiYamlData.SecuritySchemes, certAvailable, certList, apiUniqueID)
authConfigList := mapAuthConfigs(apiYamlData.ID, apiYamlData.AuthorizationHeader, apiYamlData.APIKeyHeader,
apiYamlData.SecuritySchemes, certAvailable, certList, apiUniqueID)

apk.Authentication = &authConfigList

corsEnabled := apiYamlData.CORSConfiguration.CORSConfigurationEnabled
Expand Down Expand Up @@ -384,7 +386,8 @@ func getReqAndResInterceptors(reqPolicyCount, resPolicyCount int, reqPolicies []

// mapAuthConfigs will take the security schemes as the parameter and will return the mapped auth configs to be
// added into the apk-conf
func mapAuthConfigs(apiUUID string, authHeader string, configuredAPIKeyHeader string, secSchemes []string, certAvailable bool, certList CertDescriptor, apiUniqueID string) []AuthConfiguration {
func mapAuthConfigs(apiUUID string, authHeader string, configuredAPIKeyHeader string, secSchemes []string, certAvailable bool,
certList CertDescriptor, apiUniqueID string) []AuthConfiguration {
var authConfigs []AuthConfiguration
if StringExists(oAuth2SecScheme, secSchemes) {
var newConfig AuthConfiguration
Expand Down

0 comments on commit 12813c2

Please sign in to comment.