srednausab 0 Newbie Poster

want to sent an AuthnRequest from my python-based SP (I;m using python 2.7) that I'm developing to my simpleSAMLphp installation (it's an IDP).

I'm using the "requests" module to do a get like this:

response = requests.get(url, verify='/home/me/my.crt')

where the URL is:

https://bingo.bas.com/simplesaml/module.php/core/authenticate.php?as=example-sql/?SAMLRequest=' + saml_request_base64

and the saml_request is (but converted to base64):

<samlp:AuthnRequest\
  xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"\
  AssertionConsumerServiceURL="http://localhost:8081/"\
  Destination="https://bingo.bas.com"\
  ID="asdfasdfasdfasdf"\
  IssueInstant="2020-08-05T16:37:18.517845+00:00"\
  ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST\
  Version="2.0"\
  <saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">https://localhost:8081/</saml:Issuer>\
</samlp:AuthnRequest>'

Is this the right way to go about it or is there a better (or correct) way?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.