Found a solution to use my headers generated by the sso that is providing
cas
( header are defined by me and you can see them if you put this
{{=request.env}} in a view file )
I added this in def user(): of my controllers/default.py
def user():
if 'login' in request.args:
row = db(db.auth_user.id==db.auth_user.id).select().first()
row.update_record(username = request.env.http_auth_user)
row.update_record(email = request.env.http_user_mail)
row.update_record(first_name = request.env.http_fist_name)
row.update_record(last_name = request.env.http_last_name)
db.commit()
return dict(form=auth())
return dict(form=auth())
On Friday, September 20, 2013 12:53:01 PM UTC+2, ora marin wrote:
>
> Hi All,
>
> I have successfully configure my applications to login on my Cas serveur
> (lemonLdap) but I seams to have trouble getting the username and email (
> any info from my cas serveur really )
> When I login it create a user with no data in the auth:_user table, the
> only field filled is the Registration identifier
>
> In my http header on the cas serveur side I have all those fields filled
> correctly in: user_id auth_user Auth-User User-Name name username mail
> email User-Mail
>
> my application runs on https on the url www.foo.bar, my cas serveur on
> auth.foo.bar but it delivers cas on another aplication for www.foo.bar
>
> her is the part I changed in my db.py
>
>
> from gluon.tools import Auth, Crud, Service, PluginManager, prettydate
> auth = Auth(db,cas_provider = 'https://auth.foo.bar/cas')
> crud, service, plugins = Crud(db), Service(), PluginManager()
>
> ## create all tables needed by auth if not custom tables
> auth.define_tables(username=True, signature=False)
> auth.settings.actions_disabled.append('register')
>
>
> Can did this before or point me in the right direction ?
>
> Thanks
>
>
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.