Comments (11)
Finally! I got an environment reconfigured that allowed me to publish this new version. Thanks for the patience!
from django-mama-cas.
waiting for release, thx!
from django-mama-cas.
Django 2.0 support requires recent updates which means not being able to rely on a pip requirements.txt - which is not great for production CAS deployments.
Works great though.
from django-mama-cas.
Hi @andredalle,
You can still install it using pip with:
pip install -e git+https://github.com/jbittel/django-mama-cas.git#egg=django-mama-cas
That will appear in your requirements.txt as:
-e git+https://github.com/jbittel/django-mama-cas.git@b820306c182879d70d2470d4882b911ab5fc01fc#egg=django_mama_cas
And of course you can remove the commit reference to always use the latest version available:
-e git+https://github.com/jbittel/django-mama-cas.git#egg=django_mama_cas
from django-mama-cas.
That's helpful, thanks @manelclos! Although I created a second problem for myself by modifying response.py - to pass multiple role attributes back in CAS3.0 service validation back to a Tomcat server using jasig java-cas-client, which didn't want to play nice with mama_cas SAML support. The trouble was I needed to pass back multiple attributes, and mama_cas flattens everything to a single attribute.
So I modified response.py to iterate through a given list or tuple. This allows me to return attributes['role'] = ['role1', 'role2'] in my user attributes callback.
71,72c71,79 < attr = etree.SubElement(attribute_set, self.ns(name)) < attr.text = force_text(value) --- > # handle lists as attribute items and generate > # a subtree element for each of those items > if isinstance(value, list) or isinstance(value, tuple): > for ivalue in value: > attr = etree.SubElement(attribute_set, self.ns(name)) > attr.text = force_text(ivalue) > else: > attr = etree.SubElement(attribute_set, self.ns(name)) > attr.text = force_text(value)
from django-mama-cas.
I didn't check that that works with python2, and I don't know that it's a good idea to change the behaviour on returning user attributes; could break existing CAS deployments. However this seems like sensible list behaviour to me.
from django-mama-cas.
Any status on this? Would be greatly appreciated.
from django-mama-cas.
@jbittel anything I can do to make this happen?
from django-mama-cas.
sry, if i use pip install -e git+https://github.com/jbittel/django-mama-cas.git#egg=django-mama-cas to install it. I failed to add 'mama_cas' to INSTALLED_APPS, how can i solve this problem
from django-mama-cas.
@Moonsownner what is the error you are getting? can you share more details about the problem?
from django-mama-cas.
@manelclos if use #egg to install the package. I get a 'src' folder in my project root, and the mama_cas files are in this folder. But i don't have mama_cas package in my site-packages. So how to link mama_cas into INSTALLED_APPS?
from django-mama-cas.
Related Issues (20)
- /cas/validate returns no
- Signup and password reset? HOT 2
- ImportError: cannot import name 'python_2_unicode_compatible' HOT 1
- build pip package please HOT 4
- django 3.1.5 - cannot import name 'python_2_unicode_compatible' HOT 2
- django-mama-cas and python-social-auth HOT 2
- Allow service backends to have access to the current request or user
- Allow services to decide if a request should be warned (`warn_user`)
- Django 4.2 support HOT 1
- New release HOT 1
- Custom Username CAS
- Single logout should raise on request failure HOT 1
- Single logout breaks with multiple sessions HOT 2
- Why is this code in models. py not executed when logout? HOT 3
- About the βexpireβ of ST Model HOT 1
- Question: Adding Two-Factor Auth HOT 1
- Still active? HOT 9
- Do MAMA_CAS_USER_ATTRIBUTES and MAMA_CAS_PROFILE_ATTRIBUTES work? HOT 4
- Sign on without ticket generation HOT 10
- Single Sign Out sometime can't work normally with error "Connection reset by peer" HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-mama-cas.