public function serializeToken(AuthToken $token)
  {
    $payload = $this->encrypter->encrypt(array(
      'id' => $token->getAuthIdentifier(),
      'key' => $token->getPublicKey())
    );

		$payload = str_replace(array('+', '/', '\r', '\n', '='), array('-', '_'), $payload);

    return $payload;
  }
public function serializeToken(AuthToken $token)
  {
    $payload = $this->encrypter->encrypt(array(
      'id' => $token->getAuthIdentifier(),
      'key' => $token->getPublicKey())
    );

		$payload = str_replace(array('+', '/', '\r', '\n', '='), array('-', '_'), $payload);

    return $payload;
  }
public function serializeToken ( AuthToken $ token ) { $ payload = $ this -> encrypter -> encrypt ( array ( 'id' => $ token -> getAuthIdentifier ( ) , 'key' => $ token -> getPublicKey ( ) ) ) ; $ payload = str_replace ( array ( '+' , '/' , '\r' , '\n' , '=' ) , array ( '-' , '_' ) , $ payload ) ; return $ payload ; }
Returns serialized token.

@param AuthToken $token
@return string
Returns serialized token .