-
Notifications
You must be signed in to change notification settings - Fork 0
/
sso_awardforce.module
37 lines (32 loc) · 1.13 KB
/
sso_awardforce.module
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/**
* Implements hook_menu().
*/
function sso_awardforce_menu()
{
$items['admin/config/services/sso_awardforce'] = array(
'title' => 'Award Force SSO settings',
'page callback' => 'drupal_get_form',
'page arguments' => array('sso_awardforce_settings_form'),
'access arguments' => array('administer site configuration'),
'type' => MENU_NORMAL_ITEM,
'file' => 'sso_awardforce.admin.inc',
'description' => 'Configure Award Force integration',
);
$items['awardforce/sso'] = array(
'title' => 'Award Force SSO',
'page callback' => 'sso_awardforce_login',
'access callback' => 'user_is_logged_in',
'type' => MENU_NORMAL_ITEM,
'file' => 'sso_awardforce.admin.inc',
);
return $items;
}
function sso_awardforce_login()
{
module_load_include('php', 'sso_awardforce', 'vendor/autoload');
module_load_include('inc', 'sso_awardforce', 'includes/class_award_force_api');
module_load_include('inc', 'sso_awardforce', 'includes/class_award_force_sso');
$awardForce = new AwardForceSSO(new AwardForceAPIV2);
$awardForce->sso();
}