You are here

function oauth2_login_schema in OAuth2 Login 8

Implementing hook_schema

File

./oauth2_login.install, line 43
Installation file for miniOrange OAuth Login Module.

Code

function oauth2_login_schema() {
  $schema['miniorange_oauth_client_token'] = array(
    'description' => t('User Tokens'),
    'fields' => array(
      'id' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'description' => t('S.No.: '),
      ),
      'user_id_val' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'description' => t('The UserIn of the user.'),
      ),
      'auth_code' => array(
        'type' => 'varchar',
        'length' => 256,
        'description' => t('The one time authorization code.'),
      ),
      'auth_code_expiry_time' => array(
        'type' => 'int',
        'not null' => FALSE,
        'description' => t('The one time authorization code expiry time.'),
      ),
      'access_token' => array(
        'description' => 'The access token.',
        'type' => 'varchar',
        'length' => 256,
      ),
      'access_token_request_time' => array(
        'description' => 'The access token expiry time.',
        'type' => 'int',
        'not null' => FALSE,
      ),
    ),
    'primary key' => array(
      'id',
    ),
  );
  return $schema;
}