File tree Expand file tree Collapse file tree
src/main/java/com/skyflow/utils/validations Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -185,12 +185,12 @@ public static void validateCredentials(Credentials credentials) throws SkyflowEx
185185 LogUtil .printErrorLog (ErrorLogs .EMPTY_API_KEY_VALUE .getLog ());
186186 throw new SkyflowException (ErrorCode .INVALID_INPUT .getCode (), ErrorMessage .EmptyApikey .getMessage ());
187187 } else {
188- // Pattern pattern = Pattern.compile(Constants.API_KEY_REGEX);
189- // Matcher matcher = pattern.matcher(apiKey);
190- // if (!matcher.matches()) {
191- // LogUtil.printErrorLog(ErrorLogs.INVALID_API_KEY.getLog());
192- // throw new SkyflowException(ErrorCode.INVALID_INPUT.getCode(), ErrorMessage.InvalidApikey.getMessage());
193- // }
188+ Pattern pattern = Pattern .compile (Constants .API_KEY_REGEX );
189+ Matcher matcher = pattern .matcher (apiKey );
190+ if (!matcher .matches ()) {
191+ LogUtil .printErrorLog (ErrorLogs .INVALID_API_KEY .getLog ());
192+ throw new SkyflowException (ErrorCode .INVALID_INPUT .getCode (), ErrorMessage .InvalidApikey .getMessage ());
193+ }
194194 }
195195 } else if (roles != null ) {
196196 if (roles .isEmpty ()) {
You can’t perform that action at this time.
0 commit comments