'Checks oauth signature from client.
`params` are params from post request except signature,
`client_signature` is signature from request.
Builds mocked request and verifies hmac-sha1 signing::
1. builds string to sign from `params`, `url` and `http_method`.
2. signs it with `client_secret` which comes from server settings.
3. obtains signature after sign and then compares it with request.signature
(request signature comes form client in request)
Returns `True` if signatures are correct, otherwise `False`.'

def _check_oauth_signature(self, params, client_signature):

    client_secret = unicode(self.server.config.get('client_secret', self.DEFAULT_CLIENT_SECRET))
    port = self.server.server_address[1]
    lti_base = self.DEFAULT_LTI_ADDRESS.format(port=port)
    lti_endpoint = self.server.config.get('lti_endpoint', self.DEFAULT_LTI_ENDPOINT)
    url = (lti_base + lti_endpoint)
    request = mock.Mock()
    request.params = [(unicode(k), unicode(v)) for (k, v) in params.items()]
    request.uri = unicode(url)
    request.http_method = u'POST'
    request.signature = unicode(client_signature)
    return signature.verify_hmac_sha1(request, client_secret)
