From 082a66b1f2336829a4a6d0313ade668a71b5e1d3 Mon Sep 17 00:00:00 2001 From: Jeff Lindsay Date: Wed, 29 Jun 2011 14:16:06 -0700 Subject: [PATCH 1/2] This is more correct according to the spec. --- JWT.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JWT.php b/JWT.php index 2bfb1471..0cf98fdc 100644 --- a/JWT.php +++ b/JWT.php @@ -53,7 +53,7 @@ public static function decode($jwt, $key = null, $verify = true) */ public static function encode($payload, $key, $algo = 'HS256') { - $header = array('typ' => 'jwt', 'alg' => $algo); + $header = array('typ' => 'JWT', 'alg' => $algo); $segments = array(); $segments[] = JWT::urlsafeB64Encode(JWT::jsonEncode($header)); From 4f56837904bc55728af4b9a934528f66f20121e0 Mon Sep 17 00:00:00 2001 From: Neuman Vong Date: Mon, 31 Dec 2012 14:11:04 -0800 Subject: [PATCH 2/2] BSD3 --- LICENSE | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..cb0c49b3 --- /dev/null +++ b/LICENSE @@ -0,0 +1,30 @@ +Copyright (c) 2011, Neuman Vong + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + * Neither the name of Neuman Vong nor the names of other + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.