title: SAML 2.0 Service Provider in Python
body: <p>I am looking to implement a SAML 2.0 based service provider in Python.</p>
  
  <p>My web apps are currently all Flask applications. I plan to make a Flask blueprint/decorator that allows me to drop single sign-on capabilities into preexisting applications.</p>
  
  <p>I have looked into <a href="https://github.com/onelogin/python-saml" rel="noreferrer">python-saml</a> extensively and unfortunately there are dependency issues that are not worth resolving, as I have too many preexisting servers/apps whos environments won't be compatible.</p>
  
  <p><a href="https://github.com/rohe/pysaml2" rel="noreferrer">PySAML2</a> looks like it could work, however there is little documentation, and what documentation is available I have trouble comprehending. There are no examples of PySAML2 used in a Flask app.</p>
  
  <p>The Identity Provider I have is Okta. I have Okta set up so that after I login at Okta, I am redirected to my app.</p>
  
  <p>Can anyone offer any advice on using PySAML2, or perhaps advice on how to best authenticate a user using SAML 2.0 who is visiting my application?</p>