You are here

function yandex_services_auth_info in Yandex Services Authorization API 8

Same name and namespace in other branches
  1. 6 yandex_services_auth.module \yandex_services_auth_info()
  2. 7 yandex_services_auth.module \yandex_services_auth_info()

API function to return information for other modules.

Parameters

string $value:

  • client_id
  • client_secret
  • token

File

./yandex_services_auth.module, line 34
Main file for the Yandex Services Authorization API module.

Code

function yandex_services_auth_info($value = 'token') {
  switch ($value) {
    case 'client_id':
      return \Drupal::state()
        ->get('yandex_services_auth_client_id');
    case 'client_secret':
      return \Drupal::state()
        ->get('yandex_services_auth_client_secret');
    case 'token':
    default:
      return \Drupal::state()
        ->get('yandex_services_auth_token');
  }
}