4 Replies Latest reply on Jan 14, 2010 8:20 AM by Adam Cameron.

    Determine cffunction access method?

    davidsimms Level 1

      I have a .cfc which can be called either locally or remotely. When I call it locally, there's no need to determine whether the function should be allowed to run since all local calls can be trusted. However, when called as a web service, I would like to require two paramaters (username and password) so I can determine whether the function can be permitted to execute, or if I should return an "Access denied" message. (The verifyClient attribute of the cffunction tag is not what I'm after. I need to verify the username and password against a collection of account credentials.)


      What I really need (in pseudo-code) is something like:


      IF (requested_as_a_web_service = "true")

      {check username and password against account credentials}

      ELSE {stop processing and return an "Access denied" message}


      So, is there a way to determine the access method?