function _oauth_common_provider_token_schema in OAuth 1.0 7.4
Same name and namespace in other branches
- 6.3 oauth_common.install \_oauth_common_provider_token_schema()
- 7.3 oauth_common.install \_oauth_common_provider_token_schema()
Contains the provider token schema - used by oauth_common_schema() as well as latest related update function
1 call to _oauth_common_provider_token_schema()
- oauth_common_schema in ./
oauth_common.install - Implements hook_schema().
File
- ./
oauth_common.install, line 354 - Installation and schema related functions for the OAuth module
Code
function _oauth_common_provider_token_schema() {
return array(
'description' => 'Additional data for OAuth tokens provided by this site.',
'fields' => array(
'tid' => array(
'description' => 'The {oauth_common_token}.tid this data is related to.',
'type' => 'int',
'unsigned' => TRUE,
'default' => 0,
),
'token_key' => array(
'description' => 'Token key.',
// This is our own internal key - it's always 32 characters long
'type' => 'char',
'length' => 32,
'not null' => TRUE,
),
'created' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => 'The time that the token was created, as a Unix timestamp.',
),
'changed' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => 'The last time the token was edited, as a Unix timestamp.',
),
'services' => array(
'description' => 'An array of services that the user allowed the consumer to access.',
'type' => 'text',
),
'authorized' => array(
'description' => 'In case its a request token, it checks if the user already authorized the consumer to get an access token.',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'token_key',
),
'unique keys' => array(
'tid' => array(
'tid',
),
),
'foreign keys' => array(
'oauth_common_token' => array(
'table' => 'oauth_common_token',
'columns' => array(
'tid' => 'tid',
),
),
),
);
}