You are here

function saml_sp_menu in SAML Service Provider 3.x

Same name and namespace in other branches
  1. 8.3 saml_sp.module \saml_sp_menu()
  2. 8.2 saml_sp.module \saml_sp_menu()
  3. 7.8 saml_sp.module \saml_sp_menu()
  4. 7 saml_sp.module \saml_sp_menu()
  5. 7.2 saml_sp.module \saml_sp_menu()
  6. 7.3 saml_sp.module \saml_sp_menu()
  7. 4.x saml_sp.module \saml_sp_menu()

Implements hook_menu().

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.

File

./saml_sp.module, line 34
SAML Service Provider.

Code

function saml_sp_menu() {
  $items = [];
  $items['saml/consume'] = [
    'page callback' => 'saml_sp__endpoint',
    // This endpoint should not be under access control.
    'access callback' => TRUE,
    'file' => 'saml_sp.pages.inc',
    'type' => MENU_CALLBACK,
  ];
  $items['saml/logout'] = [
    'page callback' => 'saml_sp__logout',
    // This endpoint should not be under access control.
    'access callback' => TRUE,
    'file' => 'saml_sp.pages.inc',
    'type' => MENU_CALLBACK,
  ];
  return $items;
}