Skip to content

Commit

Permalink
Fix formatting issues in APK transformer
Browse files Browse the repository at this point in the history
  • Loading branch information
sgayangi committed May 27, 2024
1 parent 633bfb4 commit fda8086
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 fda8086

Please sign in to comment.