예제 #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);
 }