Authentication Question

463 views
Skip to first unread message

Brian Sarsany

unread,
Mar 22, 2012, 12:38:17 AM3/22/12
to frapi-general
Is it possible to make a call to my Frapi api using Basic Auth? I'm
using the Chrome plugin Rest Console and I keep getting

HTTP Digest Authentication required for "Testing Your App"

Which I'm assuming is because I am not sending in the api key or
sending in authentication via Basic Auth. Does anyone have an example
of how this works? The tester within Frapi works fine, but I just
can't figure out how to create a call with Basic Auth and I don't want
to use OAuth.

Even without Basic Auth or Oauth would be fine. I just can't get
anything to work. Does anyone have an example of the header or do you
have instructions on how to make the call via Chrome Rest Console or
even Chrome Simple Rest Client.

Clay Hinson

unread,
Mar 22, 2012, 1:13:35 AM3/22/12
to frapi-...@googlegroups.com
Brian, 

I haven't found any REST clients for Chrome that properly handle Digest authentication - they simply return the 401 response. It may be that the Chrome plugin framework doesn't allow for this, but I'm not sure. 

However, in Firefox the 'REST client for Firefox' extension works well, and handles the Digest authentication via the standard authentication dialog. 

Alternatively, you can use cURL on the command line and specify digest auth (with -v to see the entire transaction):

curl -X POST -v \
--digest -u <your-frapi-user>:<your-frapi-api-key> \
-H "Content-Type:application/json" \
-d '{"param":"value"}' \

Hope that helps!
Clay

Brian Sarsany

unread,
Mar 22, 2012, 10:18:06 PM3/22/12
to frapi-general
Thanks CIay,
I guess what I'm really looking for is how to do the transaction from
outside the Frapi tester. Even from a php file or from IOS, I can't
quite figure out the header. I guess I'm looking to see exactly what
the header would be so I can create my own call from a php file for
example. I will try your curl code, but if you have any examples of
how you would do a call from php that would be great.

Thanks again.


On Mar 22, 12:13 am, Clay Hinson <clayhin...@gmail.com> wrote:
> Brian,
>
> I haven't found any REST clients for Chrome that properly handle Digest
> authentication - they simply return the 401 response. It may be that the
> Chrome plugin framework doesn't allow for this, but I'm not sure.
>
> However, in Firefox the 'REST client for Firefox' extension works well, and
> handles the Digest authentication via the standard authentication dialog.
>
> Alternatively, you can use cURL on the command line and specify digest auth
> (with -v to see the entire transaction):
>
> curl -X POST -v \
> --digest -u <your-frapi-user>:<your-frapi-api-key> \
> -H "Content-Type:application/json" \
> -d '{"param":"value"}' \http://api.frapi/action
>
> Hope that helps!
> Clay
>
> On Thu, Mar 22, 2012 at 12:38 AM, Brian Sarsany
> <brian.sars...@recsolu.com>wrote:
Reply all
Reply to author
Forward
0 new messages