You are here

public function Token::isExpired in Janrain Registration 8

File

src/Authentication/Token.php, line 78

Class

Token
The token.

Namespace

Drupal\janrain_capture\Authentication

Code

public function isExpired() : bool {
  $expiration = $this
    ->getExpiration();

  // No expiration - token is permanent.
  if ($expiration === NULL) {
    return FALSE;
  }
  return $expiration
    ->getTimestamp() < \Drupal::time()
    ->getRequestTime();
}