示例#1
0
 /**
  * Constructor.
  *
  * @param array $header An associative array of headers. The value can be any type accepted by json_encode or a JSON serializable object
  *
  * @see http://php.net/manual/en/function.json-encode.php
  * @see http://php.net/manual/en/jsonserializable.jsonserialize.php
  * @see https://tools.ietf.org/html/draft-ietf-jose-json-web-signature-41#section-4
  * }
  */
 public function __construct($header = array())
 {
     if (!isset($header['typ'])) {
         $header['typ'] = 'JWS';
     }
     parent::__construct($header);
 }
示例#2
0
文件: SimpleJWS.php 项目: namshi/jose
 /**
  * Constructor.
  *
  * @param array $header An associative array of headers. The value can be any type accepted by json_encode or a JSON serializable object
  *
  * @see http://php.net/manual/en/function.json-encode.php
  * @see http://php.net/manual/en/jsonserializable.jsonserialize.php
  * @see https://tools.ietf.org/html/draft-ietf-jose-json-web-signature-41#section-4
  * }
  */
 public function __construct($header = array(), $encryptionEngine = 'OpenSSL')
 {
     if (!isset($header['typ'])) {
         $header['typ'] = 'JWS';
     }
     parent::__construct($header, $encryptionEngine);
 }