You are here

function services_keyauth_get_key in Services 6.2

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

Return key information for a specified API key.

Parameters

$kid: The Key ID for this key in the services_keys table.

Return value

An object with the key's title and domain.

File

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

Code

function services_keyauth_get_key($kid) {
  $keys = services_keyauth_get_keys();
  foreach ($keys as $key) {
    if ($key->kid == $kid) {
      return $key;
    }
  }
}