You are here

public function Domain301RedirectManager::getRedirectCheckToken in Domain 301 Redirect 8

Generate a token based on redirect_last_checked.

Return value

string Returns the token.

Overrides Domain301RedirectManagerInterface::getRedirectCheckToken

1 call to Domain301RedirectManager::getRedirectCheckToken()
Domain301RedirectManager::getRedirectCheckUrl in src/Domain301RedirectManager.php
Generate a url to the redirect check controller endpoint.

File

src/Domain301RedirectManager.php, line 169

Class

Domain301RedirectManager
Defines an Domain301RedirectManager service.

Namespace

Drupal\domain_301_redirect

Code

public function getRedirectCheckToken() {
  $redirect_last_checked = $this->config
    ->get('redirect_last_checked') ?? 0;
  $token = Crypt::hmacBase64('domain_301_redirect_check_domain', $redirect_last_checked . Settings::getHashSalt() . $this->privateKey
    ->get());
  return $token;
}