function saml_sp_menu in SAML Service Provider 7
Same name and namespace in other branches
- 8.3 saml_sp.module \saml_sp_menu()
- 8.2 saml_sp.module \saml_sp_menu()
- 7.8 saml_sp.module \saml_sp_menu()
- 7.2 saml_sp.module \saml_sp_menu()
- 7.3 saml_sp.module \saml_sp_menu()
- 4.x saml_sp.module \saml_sp_menu()
- 3.x saml_sp.module \saml_sp_menu()
Implements hook_menu().
File
- ./
saml_sp.module, line 51 - SAML Service Provider
Code
function saml_sp_menu() {
$items = array();
$items['admin/config/people/saml_sp'] = array(
'title' => 'SAML Service Providers',
'page callback' => 'saml_sp__admin_overview',
'access arguments' => array(
'configure saml sp',
),
'file' => 'saml_sp.admin.inc',
);
$items['admin/config/people/saml_sp/IDP'] = array(
'title' => 'Identiy Providers',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
// Add a new IDP.
$items['admin/config/people/saml_sp/IDP/add'] = array(
'title' => 'Add SAML IDP',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'saml_sp__configure_idp_form',
),
'access arguments' => array(
'configure saml sp',
),
'file' => 'saml_sp.admin.inc',
'type' => MENU_LOCAL_ACTION,
);
// Configure an existing IDP.
$items['admin/config/people/saml_sp/IDP/%saml_sp_idp'] = array(
'title' => 'SAML IDP: @idp_name',
'title callback' => 'saml_sp__menu_title',
'title arguments' => array(
'SAML IDP: @idp_name',
5,
),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'saml_sp__configure_idp_form',
5,
),
'access arguments' => array(
'configure saml sp',
),
'file' => 'saml_sp.admin.inc',
);
// Confirmation form to delete an IDP.
$items['admin/config/people/saml_sp/IDP/%saml_sp_idp/delete'] = array(
'title' => 'Delete SAML IDP: @idp_name',
'title callback' => 'saml_sp__menu_title',
'title arguments' => array(
'Delete SAML IDP: @idp_name',
5,
),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'saml_sp__delete_idp_form',
5,
),
'access arguments' => array(
'configure saml sp',
),
'file' => 'saml_sp.admin.inc',
);
// Export the IDP configuration to code.
$items['admin/config/people/saml_sp/IDP/%saml_sp_idp/export'] = array(
'title' => 'Export SAML IDP: @idp_name',
'title callback' => 'saml_sp__menu_title',
'title arguments' => array(
'Export SAML IDP: @idp_name',
5,
),
'page callback' => 'saml_sp__export_idp',
'page arguments' => array(
5,
),
'access arguments' => array(
'configure saml sp',
),
'file' => 'saml_sp.admin.inc',
);
// SAML endpoint for all requests.
// Some IDPs ignore the URL provided in the authentication request
// (the AssertionConsumerServiceURL attribute) and hard-code a return URL in
// their configuration, therefore all modules using SAML SP will have the
// same consumer endpoint: /saml/consume.
// A unique ID is generated for each outbound request, and responses are
// expected to reference this ID in the `inresponseto` attribute of the
// `<samlp:response` XML node.
$items['saml/consume'] = array(
'page callback' => 'saml_sp__endpoint',
// This endpoint should not be under access control.
'access callback' => TRUE,
'file' => 'saml_sp.pages.inc',
'type' => MENU_CALLBACK,
);
return $items;
}