コード例 #1
0
ファイル: SimpleJWS.php プロジェクト: a161527/cs319-p2t5
 /**
  * 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);
 }