[web2py] Re: auth.requires(True,requires_login=False) does not work

2013-08-24 Thread Larry Weinberg
I figured it out.

I needed to add arguments to GET().  That's where the problem was coming 
from because I was sending in a value on the curl command.
I think it's working now.

Sorry for the noise.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: auth.requires(True,requires_login=False) does not work

2013-08-24 Thread Niphlod
did you try simply putting True=True as the condition ?

On Saturday, August 24, 2013 3:37:32 AM UTC+2, Larry Weinberg wrote:
>
> It seems that the requires_login option for @auth.requires() does not 
> work.  Should it?
> Is there another way to make this work for restful calls?  I want to 
> implement a token based REST authentication
>
> I get an invalid arguments message.  
> If I use Basic Authentication alone it works fine 
>
>
> Here is my controller:
>
> auth.settings.allow_basic_login = True
>
> # THIS ONE DOES NOT WORKS
> @auth.requires(somethingIKnowIsTrue==True, requires_login=False)
> @request.restful()
> def thisOneDoesNOTWork():
> def GET():   
> return dict(yo="you got it")
> return locals()
>
> # THIS ONE WORKS
> @auth.requires_login()
> @request.restful()
> def thisOneWorks():
> def GET():   
> return dict(yo="you got it")
> return locals()
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.