You are here

function _services_keyauth_security_settings_validate in Services 6.2

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

Validate callback for keyauth security settings form.

1 string reference to '_services_keyauth_security_settings_validate'
services_keyauth_authentication_info in auth/services_keyauth/services_keyauth.module
Implementation of hook_authentication_info().

File

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

Code

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