RESTServiceHelperIsUrlPathAndQueryHashValidInternal Method |
Tests whether hash computed for pathAndQuery matches expectedHash.
Validates hash expiration query parameter hashExpirationUtc if provided.
Namespace: CMS.WebServicesAssembly: CMS.WebServices (in CMS.WebServices.dll) Version: 13.0.131
Syntax protected virtual bool IsUrlPathAndQueryHashValidInternal(
string pathAndQuery,
string expectedHash
)
Parameters
- pathAndQuery
- Type: SystemString
URL absolute path and query for which to compute the hash (resolved virtual path and query string originating from RewriteRESTUrl(String, String, String, String)
or PathAndQuery of the request being validated). - expectedHash
- Type: SystemString
Hash to perform the computed hash matching against.
Return Value
Type:
BooleanReturn true if
pathAndQuery produces the same hash as
expectedHash prescribes. Otherwise returns false.
Exceptions Exception | Condition |
---|
ArgumentNullException | Thrown when pathAndQuery or expectedHash is null. |
Remarks
The produced hash is invariant of the pathAndQuery trailing slash and optional query string parameters
offset and maxrecords.
See Also