saml_sp.install in SAML Service Provider 7
Same filename and directory in other branches
Hook_requirements for the SAML Service Provider module.
File
saml_sp.installView source
<?php
/**
* @file
* Hook_requirements for the SAML Service Provider module.
*/
/**
* Implements hook_schema().
*/
function saml_sp_schema() {
$schema = array();
// Cache all outbound SAML SP requests.
$schema['saml_sp_request_tracking_cache'] = drupal_get_schema_unprocessed('system', 'cache');
// Store the IDP data.
$schema['saml_sp_idps'] = array(
'description' => 'IDPs registered with SAML Service Provider.',
// Enable CTools exportables based on this table.
'export' => array(
// SAML IDP machine name key.
'key' => 'machine_name',
// In the export, entries will be identified as $idp
'export' => 'idp',
// Description of key.
'key name' => 'IDP machine name',
// Variable name to use in exported code.
'identifier' => 'saml_idp',
// // Use the environment load callback directly.
// 'load callback' => 'apachesolr_environment_load',
// // Thin wrapper for the environment save callback.
// 'save callback' => 'apachesolr_ctools_environment_save',
// // Thin wrapper for the environment delete callback.
// 'delete callback' => 'apachesolr_ctools_environment_delete',
// // Includes the environment variables in 'conf' as well as the fields in this table.
// 'export callback' => 'apachesolr_ctools_environment_export',
// Use the same hook as the API name below.
'default hook' => 'saml_sp_default_idps',
// CTools API implementation.
'api' => array(
'owner' => 'saml_sp',
// Base name for API files: foo.saml_sp_idps.inc
'api' => 'saml_sp_idps',
'minimum_version' => 1,
'current_version' => 1,
),
),
'fields' => array(
'machine_name' => array(
'description' => 'Unique identifier for the environment',
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
),
'name' => array(
'description' => 'Human-readable name for the SAML IDP',
'type' => 'varchar',
'length' => 30,
'not null' => TRUE,
'default' => '',
),
'app_name' => array(
'description' => 'Human-readable name to provide to the IDP to identify the application',
'type' => 'varchar',
'length' => 30,
'not null' => TRUE,
'default' => '',
),
'login_url' => array(
'description' => 'Full url to connect to the SAML login endpoint',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
),
'x509_cert' => array(
'description' => 'The x.509 public certificate of the IDP',
'type' => 'varchar',
// 1024 chars should be enough for any x.509 certs.
'length' => 1024,
'not null' => TRUE,
'default' => '',
),
),
'primary key' => array(
'machine_name',
),
);
return $schema;
}
// /**
// * Implements hook_requirements().
// */
// function samp_sp_requirements($phase) {
//
// }
Functions
Name | Description |
---|---|
saml_sp_schema | Implements hook_schema(). |