public function deserializeToken($payload)
  {
    try {
      $payload = str_replace(array('-', '_'), array('+', '/'), $payload);
      $data = $this->encrypter->decrypt($payload);
    } catch (DecryptException $e) {
      return null;
    }

    if(empty($data['id']) || empty($data['key'])) {
      return null;
    }

    $token = $this->generateAuthToken($data['key']);
    $token->setAuthIdentifier($data['id']);

    return $token;
  }
public function deserializeToken($payload)
  {
    try {
      $payload = str_replace(array('-', '_'), array('+', '/'), $payload);
      $data = $this->encrypter->decrypt($payload);
    } catch (DecryptException $e) {
      return null;
    }

    if(empty($data['id']) || empty($data['key'])) {
      return null;
    }

    $token = $this->generateAuthToken($data['key']);
    $token->setAuthIdentifier($data['id']);

    return $token;
  }
public function deserializeToken ( $ payload ) { try { $ payload = str_replace ( array ( '-' , '_' ) , array ( '+' , '/' ) , $ payload ) ; $ data = $ this -> encrypter -> decrypt ( $ payload ) ; } catch ( DecryptException $ e ) { return null ; } if ( empty ( $ data [ 'id' ] ) || empty ( $ data [ 'key' ] ) ) { return null ; } $ token = $ this -> generateAuthToken ( $ data [ 'key' ] ) ; $ token -> setAuthIdentifier ( $ data [ 'id' ] ) ; return $ token ; }
Deserializes token.

@param string $payload
@return AuthToken|null
Deserializes token .