private String createRegexPattern(List<String> redirectURIs) throws DCRException { StringBuilder regexPattern = new StringBuilder(); for (String redirectURI : redirectURIs) { try { //validate the redirect uri IdentityValidationUtil.getValidInputOverWhiteListPatterns(redirectURI, new String[]{IdentityValidationUtil.ValidatorPattern.URL_WITHOUT_FRAGMENT.name()}); if (regexPattern.length() > 0) { regexPattern.append("|").append(redirectURI); } else { regexPattern.append("(").append(redirectURI); } } catch (IdentityValidationException e) { //TODO: need to add error code throw IdentityException.error(DCRException.class, "Redirect URI: " + redirectURI + ", is invalid", e); } } if (regexPattern.length() > 0) { regexPattern.append(")"); } return regexPattern.toString(); }
new String[]{IdentityValidationUtil.ValidatorPattern.URL_WITHOUT_FRAGMENT.name()}); oAuthConsumerApp.setCallbackUrl(redirectUri); } catch (IdentityValidationException e) {