You are here

public static function RestfulTokenAuthenticationBase::intervalInSeconds in RESTful 7

Process callback helper to get the time difference in seconds.

Parameters

int $value: The expiration timestamp in the access token.

Return value

int Number of seconds before expiration.

File

modules/restful_token_auth/includes/RestfulTokenAuthenticationBase.php, line 47
Contains \RestfulTokenAuthenticationBase

Class

RestfulTokenAuthenticationBase
@file Contains \RestfulTokenAuthenticationBase

Code

public static function intervalInSeconds($value) {
  $interval = $value - time();
  return $interval < 0 ? 0 : $interval;
}