$configuration = Configuration::
forAsymmetricSigner( $signer,
$privateKey,
$publicKey,
$encoder,
$decoder );
// add basic constraint for token signature validation
$constraint =
new SignedWith($signer,
$publicKey);
$configuration->
setValidationConstraints($constraint);
return $configuration;
}}