code: def authenticateRequest(self, request, service_request, *args, **kwargs):
          
          username = password = None
  
          if 'Credentials' in request.headers:
              cred = request.headers['Credentials']
  
              username = cred['userid']
              password = cred['password']
  
          return self.gateway.authenticateRequest(service_request, username,
              password, *args, **kwargs)
docs: Authenticates the request against the service.
  
          @param request: The AMF request
          @type request: L{Request<pyamf.remoting.Request>}