function openid_update_6000

Add a table to store nonces.

Related topics

File

modules/openid/openid.install, line 132

Code

function openid_update_6000() {
    $schema['openid_nonce'] = array(
        'description' => 'Stores received openid.response_nonce per OpenID endpoint URL to prevent replay attacks.',
        'fields' => array(
            'idp_endpoint_uri' => array(
                'type' => 'varchar',
                'length' => 255,
                'description' => 'URI of the OpenID Provider endpoint.',
            ),
            'nonce' => array(
                'type' => 'varchar',
                'length' => 255,
                'description' => 'The value of openid.response_nonce',
            ),
            'expires' => array(
                'type' => 'int',
                'not null' => TRUE,
                'default' => 0,
                'description' => 'A Unix timestamp indicating when the entry should expire.',
            ),
        ),
        'indexes' => array(
            'nonce' => array(
                'nonce',
            ),
            'expires' => array(
                'expires',
            ),
        ),
    );
    db_create_table('openid_nonce', $schema['openid_nonce']);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.