You are here

function services_keyauth_get_keys in Services 6.2

Same name and namespace in other branches
  1. 7 auth/services_keyauth/services_keyauth.module \services_keyauth_get_keys()

Return key information for all API keys.

Return value

An associative array of objects with the key's title and domain, keyed on the Key ID.

3 calls to services_keyauth_get_keys()
services_crossdomain_xml in ./services.module
Callback for crossdomain.xml
services_keyauth_admin_keys_list in auth/services_keyauth/services_keyauth.admin.inc
Display all the available API keys.
services_keyauth_get_key in auth/services_keyauth/services_keyauth.module
Return key information for a specified API key.
1 string reference to 'services_keyauth_get_keys'
services_crossdomain_xml in ./services.module
Callback for crossdomain.xml

File

auth/services_keyauth/services_keyauth.module, line 189
Provides a key based validation system.

Code

function services_keyauth_get_keys() {
  static $keys;
  if (!$keys) {
    $keys = array();
    $result = db_query("SELECT * FROM {services_keys}");
    while ($key = db_fetch_object($result)) {
      $keys[$key->kid] = $key;
    }
  }
  return $keys;
}