-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Massimo, thanks.

Now, if I try the exposed login controller in my application, I'm
getting ticket with

id,email,name=session.token
TypeError: 'NoneType' object is not iterable

instead of login page being shown.

In CAS.login_url there is a http://localhost:8000/cas/cas/login, which
is correct - on this URL there a functional CAS login page sits.

Should I do something more in the application, than to

1) add unmodified cas.py to the models
2) set the CAS.login_url, CAS.check_url, CAS.logout_url and CAS.my_url
3) expose the login()
?

BTW the CAS.my_url contains link to the login() exposed above, I hope,
this is correct.

With regards,

David

mdipierro napsal(a):
> 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 <d...@atlas.cz> 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!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkn02UsACgkQ3oCkkciamVG2YQCgqQvX+LQx8LJ135T1ihlWfJ98
cbkAn2f+uOCP4/DrAwOs17Gg7jlUmev3
=x77y
-----END PGP SIGNATURE-----

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to