In one of the model files you need to setup HOST, this is something
like "http://hostname:port"; as visible by your authentication
provider. web2py does not always gets it right because may be running
behind a proxy.

Massimo


On Apr 23, 5:49 pm, dvid <[email protected]> wrote:
> I added the CAS service provider as a "cas" application to my web2py,
> changed db to MySQL and configured email.py. Itself it seems to work,
> or at least, there are no errors reported. I can successfully
> register, login, logout, change password.
>
> But I'm doing something wrong, when trying to use it as a provider in
> the separate app called jfind.
>
> I added the cas.py to the jfind models without modifications.
>
> Currently, my controller called "users" in the jfind app begins with:
>
> CAS.login_url='%s/cas/cas/login' % (HOST)
> CAS.check_url='%s/cas/cas/check' % (HOST)
> CAS.logout_url='%s/cas/cas/logout' % (HOST)
> CAS.my_url='%s/%s/users/login' % (HOST,request.application)
>
> def login():
>     session.token=CAS.login(request)
>     id,email,name=session.token
>     return dict()
> ...
>
> Now the login function, instead of HTML with something more
> meaningful, generates only:
>
> You are being redirected <a href="localhost:8000/cas/cas/login?
> service=localhost:8000/jfind/users/login">here</a>
>
> Please, what I'm missing?
>
> Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to