Giter VIP home page Giter VIP logo

Comments (11)

jbittel avatar jbittel commented on June 22, 2024 2

Finally! I got an environment reconfigured that allowed me to publish this new version. Thanks for the patience!

from django-mama-cas.

klem4 avatar klem4 commented on June 22, 2024

waiting for release, thx!

from django-mama-cas.

andredalle avatar andredalle commented on June 22, 2024

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.

manelclos avatar manelclos commented on June 22, 2024

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.

andredalle avatar andredalle commented on June 22, 2024

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.

andredalle avatar andredalle commented on June 22, 2024

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.

rinti avatar rinti commented on June 22, 2024

Any status on this? Would be greatly appreciated.

from django-mama-cas.

manelclos avatar manelclos commented on June 22, 2024

@jbittel anything I can do to make this happen?

from django-mama-cas.

j4tmr avatar j4tmr commented on June 22, 2024

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.

manelclos avatar manelclos commented on June 22, 2024

@Moonsownner what is the error you are getting? can you share more details about the problem?

from django-mama-cas.

j4tmr avatar j4tmr commented on June 22, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.