Eolisation d'un Fournisseur d'identité Shibboleth / Eole Shibboleth IDP integration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

shibboleth-idp.py 878B

12345678910111213141516171819202122232425262728293031
  1. # -*- coding: utf-8 -*-
  2. def getLdapReader(encoder, passwd):
  3. import os
  4. try:
  5. if os.path.isfile(passwd):
  6. mypwdreader=open(passwd, "r").readline().rstrip()
  7. if encoder == "":
  8. return mypwdreader
  9. elif encoder == "base64":
  10. import base64
  11. return base64.b64encode(mypwdreader)
  12. else:
  13. return passwd
  14. except:
  15. return "mot de passe inconnu"
  16. def getSealer(encoder, file):
  17. import os
  18. try:
  19. if os.path.isfile(file):
  20. mypwdreader=open(file, "r").readline().rstrip()
  21. if encoder == "":
  22. return mypwdreader
  23. elif encoder == "base64":
  24. import base64
  25. return base64.b64encode(mypwdreader)
  26. else:
  27. return file
  28. except:
  29. return "mot de passe inconnu"