Skip to content

Commit

Permalink
Update InboundWebsocketProcessorUtil.java
Browse files Browse the repository at this point in the history
  • Loading branch information
thisaltennakoon committed Sep 6, 2023
1 parent 7d04e00 commit a8bcbd5
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import org.wso2.carbon.apimgt.gateway.handlers.Utils;
import org.wso2.carbon.apimgt.gateway.handlers.WebsocketUtil;
import org.wso2.carbon.apimgt.gateway.handlers.security.APIKeyValidator;
import org.wso2.carbon.apimgt.gateway.handlers.security.APISecurityConstants;
import org.wso2.carbon.apimgt.gateway.handlers.security.APISecurityException;
import org.wso2.carbon.apimgt.gateway.handlers.security.jwt.JWTValidator;
import org.wso2.carbon.apimgt.gateway.handlers.streaming.websocket.WebSocketApiConstants;
Expand Down Expand Up @@ -333,7 +334,8 @@ public static InboundProcessorResponseDTO authenticateToken(InboundMessageContex
} else if (inboundMessageContext.getRequestHeaders().get(APIConstants.API_KEY_HEADER_QUERY_PARAM) != null || inboundMessageContext.getApiKeyFromQueryParams() != null) {
return new ApiKeyAuthenticator().authenticate(inboundMessageContext, authenticationType);
} else {
return null;
throw new APISecurityException(APISecurityConstants.API_AUTH_GENERAL_ERROR,
APISecurityConstants.API_AUTH_GENERAL_ERROR_MESSAGE);
}
}

Expand Down

0 comments on commit a8bcbd5

Please sign in to comment.