function shib_auth_schema in Shibboleth Authentication 8
Same name and namespace in other branches
- 6.4 shib_auth.install \shib_auth_schema()
- 6.3 shib_auth.install \shib_auth_schema()
- 7.4 shib_auth.install \shib_auth_schema()
Implements hook_schema().
Defines the database tables used by this module.
See also
File
- ./
shib_auth.install, line 17 - Install, update and uninstall functions for the shib_auth module.
Code
function shib_auth_schema() {
$schema['shib_authmap'] = [
'description' => 'Store Shibboleth User information.',
'fields' => [
'id' => [
'type' => 'serial',
'not null' => TRUE,
'description' => 'Primary Key: Unique ID.',
],
'uid' => [
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => "Creator user's {users}.uid",
],
'targeted_id' => [
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => "User's Targeted Id",
],
'idp' => [
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
'default' => '',
'description' => "User's IDP",
],
'consentver' => [
'type' => 'varchar',
'length' => 16,
'not null' => FALSE,
'default' => '',
'description' => "User's consent version",
],
'created' => [
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => 'created date',
],
],
'primary key' => [
'id',
],
'indexes' => [
'uid' => [
'uid',
],
'targeted_id' => [
'targeted_id',
],
'idp' => [
'idp',
],
'created' => [
'created',
],
],
];
$schema['shib_auth'] = [
'description' => 'Store Shibboleth User role information.',
'fields' => [
'id' => [
'type' => 'serial',
'not null' => TRUE,
'description' => 'Primary Key: Unique ID.',
],
'field' => [
'type' => 'varchar',
'length' => 128,
'not null' => FALSE,
'default' => '',
'description' => "Field",
],
'regexpression' => [
'type' => 'varchar',
'length' => 128,
'not null' => FALSE,
'default' => '',
'description' => "Regular Expression",
],
'role' => [
'type' => 'varchar',
'length' => 128,
'not null' => FALSE,
'default' => '',
'description' => "User's consent version",
],
'sitcky' => [
'type' => 'int',
'not null' => FALSE,
'description' => 'Sticky Role',
],
],
'primary key' => [
'id',
],
'indexes' => [
'field' => [
'field',
],
'role' => [
'role',
],
],
];
return $schema;
}