params:
   params, Hash
   request, String
 returns:
   boolean, Returns true if the incoming request is an authenticated verify post.
335993
def receive_verify_post(params, request)
      if request.post?
        [:action, :email, :send_id, :sig].each { |key| return false unless params.has_key?(key) }

        return false unless params[:action] == :verify

        sig = params.delete(:sig)
        params.delete(:controller)
        return false unless sig == get_signature_hash(params, @secret)

        _send = get_send(params[:send_id])
        return false unless _send.has_key?('email')

        return false unless _send['email'] == params[:email]

        return true
      else
        return false
      end
    end
1141658
def __verify_auth_params(username, password, access_token):
        """"""

        if all(v is not None for v in [username, password, access_token]):
            raise ValueError('Cannot supply a username/password and a access token')

        if (username is None or password is None) and access_token is None:
            raise ValueError('Must supply a username/password or access token')
431672
def authenticate!
      if u = user_class.send(config[:authenticate_method], *required_param_values)
        success!(u)
      else
        fail!(config[:error_message])
      end
    end
718984
def create_params params
      options = {}
      options[:query] = params

      if @auth_token
        options[:query].merge!(auth_token: @auth_token)
      else
        options[:basic_auth] = @auth
      end

      options
    end
202875
def authenticate(params)
      credentials = Authenticate.configuration.user_model_class.credentials(params)
      Authenticate.configuration.user_model_class.authenticate(credentials)
    end
385253
def checkAndCreateParams(self, params):
        
        actual_params = self['parameters'].keys()
        for k, v in params.items():
            if k not in actual_params:
                self['parameters'].append({"name": k, "value": v})
        self.reload()
        return self['parameters'].keys() == params.keys()
262915
def verify_param(self, param, must=[], r=None):
        ''''''
        if APIKEY not in param:
            param[APIKEY] = self.apikey()

        r = Result() if r is None else r
        for p in must:
            if p not in param:
                r.code(Code.ARGUMENT_MISSING).detail('missing-' + p)
                break

        return r
176894
def verify(self, user, device=None):
        
        payload = {"user": user, "token": self.token}
        if device:
            payload["device"] = device
        try:
            request = Request("post", USER_URL, payload)
        except RequestError:
            return None
        else:
            return request.answer["devices"]
1338498
def request_parameters
      Hash[(Tumblr::Client::POST_OPTIONS | [:id, :type]).map {|key|
        [key.to_s, send(key)] if respond_to?(key) && send(key)
      }.compact]
    end
118389
def verify_url
      if not valid_msg_signature(params)
        Rails.logger.debug("#{__FILE__}:#{__LINE__} Failure because signature is invalid")
        render text: "", status: 401
        return
      end
      content, status = Prpcrypt.decrypt(aes_key, params[:echostr], corp_id)
      render text: content, status: status
    end
597518
def verify_request_common(consumers, url, method, headers, params):
    
    log.debug("consumers %s", consumers)
    log.debug("url %s", url)
    log.debug("method %s", method)
    log.debug("headers %s", headers)
    log.debug("params %s", params)

    oauth_server = LTIOAuthServer(consumers)
    oauth_server.add_signature_method(
        SignatureMethod_PLAINTEXT_Unicode())
    oauth_server.add_signature_method(
        SignatureMethod_HMAC_SHA1_Unicode())

    # Check header for SSL before selecting the url
    if headers.get('X-Forwarded-Proto', 'http') == 'https':
        url = url.replace('http:', 'https:', 1)

    oauth_request = Request_Fix_Duplicate.from_request(
        method,
        url,
        headers=dict(headers),
        parameters=params
    )
    if not oauth_request:
        log.info('Received non oauth request on oauth protected page')
        raise LTIException('This page requires a valid oauth session '
                           'or request')
    try:
        # pylint: disable=protected-access
        oauth_consumer_key = oauth_request.get_parameter('oauth_consumer_key')
        consumer = oauth_server.lookup_consumer(oauth_consumer_key)
        if not consumer:
            raise oauth2.Error('Invalid consumer.')
        oauth_server.verify_request(oauth_request, consumer, None)
    except oauth2.Error:
        # Rethrow our own for nice error handling (don't print
        # error message as it will contain the key
        raise LTIException("OAuth error: Please check your key and secret")

    return True
1056761
def hashify_query_string
      if request.query_string && request.query_string.length > 0
        redirect_to request.url.gsub('?', '#')
        return true
      end
      return false
    end
1320021
def auth_params
      return {} unless Softlayer.configuration
      auth_hash = {
        authenticate: {
          'username' => Softlayer.configuration.username,
          'apiKey' => Softlayer.configuration.api_key
        }
      }
      auth_hash.merge!({
        "clientLegacySession" =>
          {
            "userId" => Softlayer.configuration.impersonate_user,
            "authToken" => Softlayer.configuration.impersonate_token
          }
      }) if Softlayer.impersonating?
      auth_hash
    end
661004
def sign(params)
      raise "Something's wrong; @secret is nil" if @secret.nil?
      sign_me = @secret
      params.keys.sort.each do |key|
        sign_me += key
        raise "Omit params with nil values; key #{key} was nil" if params[key].nil?
        sign_me += params[key]
      end
      return Digest::MD5.hexdigest(sign_me)
    end
145020
def authenticate
      if @user = User.authenticate(params[:email], params[:password])
        render json: {message: @user, success: true}, status: 200
      else
        render json: {message: "Authentication failed", success: false}, status: :ok
      end
    end
233035
def verify(self):
        
        try:
            if self.timestamp_mismatch is not None:
                m = _iso8601_timestamp_regex.match(self.request_timestamp)
                year = int(m.group("year"))
                month = int(m.group("month"))
                day = int(m.group("day"))
                hour = int(m.group("hour"))
                minute = int(m.group("minute"))
                second = int(m.group("second"))

                req_ts = datetime(year, month, day, hour, minute, second)
                now = datetime.utcnow()

                if abs(req_ts - now) > timedelta(0, self.timestamp_mismatch):
                    raise InvalidSignatureError("Timestamp mismatch")

            if self.expected_signature != self.request_signature:
                raise InvalidSignatureError(
                    "Signature mismatch: expected %r, got %r" % (
                        self.expected_signature, self.request_signature))
        except (AttributeError, KeyError, ValueError) as e:
            raise InvalidSignatureError(str(e))

        return True
506015
def post_data(self, url, params):
        
        url = urljoin(self.endpoint, url)
        headers = {'Authorization': self.token}
        req = requests.post(url, headers=headers, data=params, verify=False)

        if req.status_code == 204:
            return True

        if req.status_code == 404:
            raise NotFoundError()

        try:
            data = req.json()
        except ValueError as e:
            raise JSONReadError(
                'Read failed from API: %s' % str(e)
            )

        if not req.ok:
            msg = [data[m] for m in ("id", "message") if m in data][1]
            raise DataReadError(msg)

        return data