You are here

function _services_keyauth_security_settings_validate in Services 7

Same name and namespace in other branches
  1. 6.2 auth/services_keyauth/services_keyauth.inc \_services_keyauth_security_settings_validate()
1 string reference to '_services_keyauth_security_settings_validate'
services_keyauth_authentication_info in auth/services_keyauth/services_keyauth.module
Implements hook_authentication_info().

File

auth/services_keyauth/services_keyauth.inc, line 32
The implementation of the key authentication scheme

Code

function _services_keyauth_security_settings_validate($form_state) {
  if (isset($form_state['input']['services_key_expiry']) && !preg_match('/^\\d+$/', $form_state['input']['services_key_expiry'])) {
    form_set_error('services_key_expiry', t('The token expiry time must specified in whole seconds as a number'));
  }
}