Click or drag to resize
RESTServiceHelperIsUrlPathAndQueryHashValidInternal Method
Tests whether hash computed for pathAndQuery matches expectedHash.

Namespace: CMS.WebServices
Assembly: CMS.WebServices (in CMS.WebServices.dll) Version: 11.0.0
Syntax
C#
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: Boolean
Return true if pathAndQuery produces the same hash as expectedHash prescribes. Otherwise returns false.
Exceptions
ExceptionCondition
ArgumentNullExceptionThrown 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