Class SopMockUrlValidator
java.lang.Object
de.hybris.platform.acceleratorservices.web.payment.validation.AbstractMockUrlValidator
de.hybris.platform.acceleratorservices.web.payment.validation.SopMockUrlValidator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final Stringprotected static final StringFields inherited from class de.hybris.platform.acceleratorservices.web.payment.validation.AbstractMockUrlValidator
ALLOWED_PAYMENT_HOSTS, SEPARATOR, URL_STRICT_CHECK_ENABLED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringbooleanValidate the passed merchant callback url, if it is allowed or not.Methods inherited from class de.hybris.platform.acceleratorservices.web.payment.validation.AbstractMockUrlValidator
extractPathFromUrl, extractSchemeHostAndPortFromUrl, getAllowedHosts, getBaseSiteService, getConfigurationService, getDefaultAllowedSchemeHostAndPortUrls, getSiteBaseUrlResolutionService, isStrictCheckEnabled, isValidUrlSyntax, setBaseSiteService, setConfigurationService, setSiteBaseUrlResolutionService, validatePaymentResponseUrl
-
Field Details
-
ALLOWED_MERCHANT_HOSTS
- See Also:
-
PAYMENT_RESPONSE_END_RELATIVE_URL
- See Also:
-
MERCHANT_CALLBACK_END_RELATIVE_URL
- See Also:
-
EXTENDED_MERCHANT_CALLBACK_END_RELATIVE_URL
- See Also:
-
-
Constructor Details
-
SopMockUrlValidator
public SopMockUrlValidator()
-
-
Method Details
-
getPaymentResponseEndRelativeUrl
- Specified by:
getPaymentResponseEndRelativeUrlin classAbstractMockUrlValidator
-
validateMerchantCallBackUrl
Validate the passed merchant callback url, if it is allowed or not. For a Url to be allowed it must be only containing allowed scheme, host and port. Allowed hosts are picked up from config property acceleratorservices.merchant.callback.url.allowlist Also the url must contain the relative path (/integration/merchant_callback OR /payment/sop/response).If the property acceleratorservices.payment.url.strict.enabled is set to false this method only does scheme validation
UrlSchemeValidator, and skips other validations.- Parameters:
url- url to be validated.- Returns:
- true if url is allowed, otherwise false.
-