aai.class.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. namespace Shibboleth;
  3. /**
  4. * Shibboleth configuration for the AAI federation.
  5. *
  6. * @license see /license.txt
  7. * @author Laurent Opprecht <laurent@opprecht.info>, Nicolas Rod for the University of Geneva
  8. */
  9. class aai
  10. {
  11. /**
  12. *
  13. * @return ShibbolethConfig
  14. */
  15. public static function config()
  16. {
  17. $result = new ShibbolethConfig();
  18. $result->unique_id = 'Shib-SwissEP-UniqueID';
  19. $result->firstname = 'Shib-InetOrgPerson-givenName';
  20. $result->lastname = 'Shib-Person-surname';
  21. $result->email = 'Shib-InetOrgPerson-mail';
  22. $result->language = 'Shib-InetOrgPerson-preferredLanguage';
  23. $result->gender = 'Shib-SwissEP-Gender';
  24. $result->address = 'Shib-OrgPerson-postalAddress';
  25. $result->staff_category = 'Shib-SwissEP-StaffCategory';
  26. $result->home_organization_type = 'Shib-SwissEP-HomeOrganizationType';
  27. $result->home_organization = 'Shib-SwissEP-HomeOrganization';
  28. $result->affiliation = 'Shib-EP-Affiliation';
  29. $result->persistent_id = 'persistent-id';
  30. $result->default_status = Shibboleth::STUDENT_STATUS;
  31. $result->affiliation_status = array(
  32. 'faculty' => Shibboleth::TEACHER_STATUS,
  33. 'member' => Shibboleth::STUDENT_STATUS,
  34. 'staff' => Shibboleth::STUDENT_STATUS,
  35. 'student' => Shibboleth::STUDENT_STATUS,
  36. );
  37. $result->update_fields = array(
  38. 'firstname' => true,
  39. 'lastname' => true,
  40. 'email' => true,
  41. 'status' => false,
  42. 'persistent_id' => true,
  43. );
  44. /*
  45. * Persistent id should never change but it was introduced after unique id.
  46. * So we update persistent id on login for those users who are still missing it.
  47. */
  48. $result->is_email_mandatory = true;
  49. $result->affiliation_status_request = array(
  50. 'faculty' => false,
  51. 'member' => false,
  52. 'staff' => true,
  53. 'student' => false,
  54. );
  55. $result->admnistrator_email = '';
  56. return $result;
  57. }
  58. }