Example #1
0
 /**
  * Returns the signature from given data
  *
  * @param array $header
  * @param string $data
  *
  * @return Signature
  */
 protected function parseSignature(array $header, $data)
 {
     if (empty($data) || !isset($header['alg']) || $header['alg'] == 'none') {
         return null;
     }
     $hash = $this->decoder->base64UrlDecode($data);
     return new Signature($hash);
 }