WEB2PY CAS with basic auth

150 views
Skip to first unread message

Muhammad Bilal

unread,
Apr 4, 2017, 9:31:54 AM4/4/17
to web2py-users
Hi Massimo

I am developing a project where I have two web2py applications App A is provider and App B is consumer.

So I have setup CAS in consumer and it is working fine for normal browser stuff.

But when I am trying to use basic auth with restful api then I always get Not Authorized. If I remove CAS it starts working but with CAS it is not.

Can you tell me is there any way to use basic login with CAS?

Thanks and Regards


Massimo Di Pierro

unread,
Apr 12, 2017, 7:27:56 AM4/12/17
to web2py-users
This is probably a bug. Can I open an issue so it will be tracked? Can you also provide a simple code example that does not work?

Sharjeel Ali Shaukat

unread,
Oct 19, 2017, 2:08:16 AM10/19/17
to web2py-users
Yes massimo we need this functionality, Please can you resolved this problem as soon as possible

Ben Hagen

unread,
May 22, 2018, 1:51:30 PM5/22/18
to web2py-users
I am having the same issue here on version 2.16.1. Basic example would be

auth = Auth(db, cas_provider='/central/default/user/cas')
auth
.settings.allow_basic_login = True

@auth.requires_login()
def default():
   
return dict()

@massimo did you create a bug? Can't find it on github.

黄祥

unread,
May 22, 2018, 5:39:34 PM5/22/18
to web2py-users
cas_provider value should be using the url

Ben Hagen

unread,
May 23, 2018, 10:19:02 AM5/23/18
to web2py-users
Sorry yeah I truncated the URL in this message for privacy. In fact it does look like this

auth = Auth(db, cas_provider='https:/example.com/central/default/user/cas')

auth
.settings.allow_basic_login = True


@auth.requires_login()
def default():
   
return dict()

CAS is working as expected. The only problem we have is that it does not work for basic auth.

Best regards
Ben

Ben Hagen

unread,
Jun 18, 2018, 10:05:18 AM6/18/18
to web2py-users
I have filed an issue for this: https://github.com/web2py/web2py/issues/1938

Maybe someone can point me in the right direction how it could be fixed.
Reply all
Reply to author
Forward
0 new messages