Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 57 lines (51 sloc) 2.039 kb
5c4910a @adamfranco Initial brain dump. Adding and removing users from groups works.
authored
1 <?php
2
d242f2d @adamfranco Now does logins via CAS.
authored
3 // CAS Login Info
4 define('CAS_HOST', 'login.middlebury.edu');
5 define('CAS_PORT', 443);
6 define('CAS_PATH', '/cas');
7
60d866c @adamfranco Now uses the Midd 2D theme.
authored
8 // Define $getUserDisplayName as a custom callback function for accessing the current user's name.
9 // $getUserDisplayName = create_function('', " return phpCAS::getAttribute('FirstName').' '.phpCAS::getAttribute('LastName');");
10
3fa45e9 @adamfranco Can now limit authorization based on groups or other attributes.
authored
11 // Define a list of attributes which if any are matched, will grant the user access
12 // to the application.
13 // Values can be either a single string or an array of strings. If an array, each value
14 // will be checked separately.
15 // $authorizedUserAttributes = array(
16 // 'MemberOf' => 'CN=institution,OU=General,OU=Groups,DC=middlebury,DC=edu',
17 // );
18
5c4910a @adamfranco Initial brain dump. Adding and removing users from groups works.
authored
19 // Configure the first LDAP Server.
20 $ldapConfig = array();
21 $ldapConfig['LDAPHost'] = 'ad.middlebury.edu';
22 $ldapConfig['LDAPPort'] = 389;
23 $ldapConfig['BindDN'] = 'binduser';
24 $ldapConfig['BindDNPassword'] = 'bindpassword';
25 $ldapConfig['BaseDN'] = 'DC=middlebury,DC=edu';
26 $ldapConfig['UserBaseDN'] = 'DC=middlebury,DC=edu';
27 $ldapConfig['GroupBaseDN'] = 'OU=Groups,DC=middlebury,DC=edu';
28 $ldapConfig['WritableGroupContainers'] = array(
29 'OU=MIDD,OU=web data,DC=middlebury,DC=edu',
30 'OU=MIIS,OU=web data,DC=middlebury,DC=edu',
31 );
3aadf5c @adamfranco Added a fix for base64_decode to allow the strict argument to work on PH...
authored
32 // This is that attribute in LDAP that maps to the the CAS user id.
33 $ldapConfig['UserIdAttribute'] = 'middleburyCollegeUID';
5c4910a @adamfranco Initial brain dump. Adding and removing users from groups works.
authored
34
140129d @adamfranco Can now ping other systems to notify them of group membership changes.
authored
35 global $notifyConfig;
36 $notifyConfig = array(
37 array( 'URL' => 'http://chisel.middlebury.edu/~afranco/directory/',
38 'Type' => 'POST',
39 'GroupParam' => 'group_id',
40 'OtherParams' => array(
41 'action' => 'clear_cache',
42 'ADMIN_ACCESS' => 'sdfj239ug2jasdgae01jLKJ',
43 ),
44 ),
45 array( 'URL' => 'http://chisel.middlebury.edu/~afranco/drupal/',
46 'Type' => 'GET',
47 'GroupParam' => 'group_id',
48 'OtherParams' => array(
49 'q' => 'casmmsync/update_group',
50 'passkey' => 'OkCacheCleared',
51 ),
52 ),
53 );
5c4910a @adamfranco Initial brain dump. Adding and removing users from groups works.
authored
54
55 define('DISPLAY_ERROR_BACKTRACE', false);
56 define('SHOW_TIMERS', true);
57 define('SHOW_TIMERS_IN_OUTPUT', false);
Something went wrong with that request. Please try again.