Skip to content

Commit 25190a9

Browse files
committed
Enable Choreo API Key Authenticator for apiKey scheme
1 parent 8504e88 commit 25190a9

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

enforcer-parent/enforcer/src/main/java/org/wso2/choreo/connect/enforcer/constants/APIConstants.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ public class APIConstants {
4848
public static final String API_SECURITY_MUTUAL_SSL = "mutualssl";
4949
public static final String API_SECURITY_BASIC_AUTH = "basic_auth";
5050
public static final String SWAGGER_API_KEY_AUTH_TYPE_NAME = "apiKey";
51-
public static final String API_SECURITY_CHOREO_API_KEY = "api_key";
5251
public static final String SWAGGER_API_KEY_IN_HEADER = "header";
5352
public static final String SWAGGER_API_KEY_IN_QUERY = "query";
5453
public static final String API_SECURITY_MUTUAL_SSL_MANDATORY = "mutualssl_mandatory";

enforcer-parent/enforcer/src/main/java/org/wso2/choreo/connect/enforcer/security/AuthFilter.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,8 @@ private void initializeAuthenticators(APIConfig apiConfig) {
8888
equalsIgnoreCase(APIConstants.API_SECURITY_OAUTH_BASIC_AUTH_API_KEY_MANDATORY)) {
8989
isOAuthBasicAuthMandatory = true;
9090
} else if (apiSecurityLevel.trim().equalsIgnoreCase(APIConstants.SWAGGER_API_KEY_AUTH_TYPE_NAME)) {
91-
isApiKeyProtected = true;
92-
} else if (apiSecurityLevel.trim().equalsIgnoreCase(APIConstants.API_SECURITY_CHOREO_API_KEY)) {
9391
isChoreoApiKeyProtected = true;
92+
isApiKeyProtected = true;
9493
}
9594
}
9695
}

0 commit comments

Comments
 (0)