You are here

function oauth2_server_token_bundles in OAuth2 Server 7

Define the available token bundles.

Return value

array An array as expected by the 'bundles' key in hook_entity_info().

3 calls to oauth2_server_token_bundles()
oauth2_server_entity_info in ./oauth2_server.module
Implements hook_entity_info().
oauth2_server_flush_caches in ./oauth2_server.module
Implements hook_flush_caches().
oauth2_server_uninstall in ./oauth2_server.install
Implements hook_uninstall().

File

./oauth2_server.module, line 318
Provides OAuth2 server functionality.

Code

function oauth2_server_token_bundles() {
  $bundles = array(
    'access' => array(
      'label' => t('Access token'),
    ),
    'refresh' => array(
      'label' => t('Refresh token'),
    ),
  );
  drupal_alter(__FUNCTION__, $bundles);
  return $bundles;
}