pysaml2 icon indicating copy to clipboard operation
pysaml2 copied to clipboard

Need simpler example

Open lietu opened this issue 5 years ago • 6 comments

Code Version

master

Expected Behavior

Find a simple example of necessary configuration and usage of the library from the project site.

Current Behavior

Find a 1000+ line code written in such a low level that apparently at least 500 lines of that is boilerplate for rendering HTML tables and other such nonsense that are in no way related to actual to SAML, the library, or its usage.

Possible Solution

Please write a new minimal example with something like flask that just shows the usage of the pysaml2 library via APIs, no HTML rendering or other such unnecessary things.

Steps to Reproduce

  1. Google for python saml
  2. Land on pysaml2
  3. Look up examples
  4. Get confused

lietu avatar May 19 '20 08:05 lietu

Hi lietu, I hope to be useful to you.

These are quite good examples about pysaml2 usage in a real python framework, it's Django but it would be trivial to port them also to Flask.

For Saml2 SP see djangosaml2, here: https://github.com/knaperek/djangosaml2#pysaml2-specific-files-and-configuration

For Saml2 IdP see uniAuth or djangosaml2idp: https://github.com/UniversitaDellaCalabria/uniAuth/tree/refactor

Please put a star on these if you think they can really help the community around pysaml2

peppelinux avatar Sep 04 '20 14:09 peppelinux

Those are wrapper libraries, not examples of usage of this library.

lietu avatar Sep 04 '20 15:09 lietu

Those are wrapper libraries, not examples of usage of this library.

They are also examples of pysaml2 usage. We can see pysaml2's objects an methods belonging to its most important features. Give it a try

peppelinux avatar Sep 05 '20 09:09 peppelinux

Also related to this https://github.com/IdentityPython/pysaml2/issues/362

peppelinux avatar Sep 05 '20 20:09 peppelinux

Also related to SLO example here: https://github.com/IdentityPython/pysaml2/issues/427

peppelinux avatar Sep 05 '20 21:09 peppelinux

Here some bug and issues related to examples available in pysaml2: https://github.com/IdentityPython/pysaml2/issues/595 https://github.com/IdentityPython/pysaml2/issues/636

peppelinux avatar Sep 05 '20 21:09 peppelinux