From b4e0fe0238c7be09cc60957e2011e3c98fda84d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Ot=C3=A1vio=20Cobucci=20Oblonczyk?= Date: Thu, 1 Oct 2015 13:12:43 -0300 Subject: [PATCH] Token type should always be JWT. --- src/Signer/BaseSigner.php | 1 - test/unit/Signer/BaseSignerTest.php | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Signer/BaseSigner.php b/src/Signer/BaseSigner.php index be2d1a32..3d41eb86 100644 --- a/src/Signer/BaseSigner.php +++ b/src/Signer/BaseSigner.php @@ -23,7 +23,6 @@ abstract class BaseSigner implements Signer */ public function modifyHeader(array &$headers) { - $headers['typ'] = 'JWS'; $headers['alg'] = $this->getAlgorithmId(); } diff --git a/test/unit/Signer/BaseSignerTest.php b/test/unit/Signer/BaseSignerTest.php index e50e4776..cede77a1 100644 --- a/test/unit/Signer/BaseSignerTest.php +++ b/test/unit/Signer/BaseSignerTest.php @@ -36,13 +36,13 @@ protected function setUp() * * @covers Lcobucci\JWT\Signer\BaseSigner::modifyHeader */ - public function modifyHeaderShouldChangeAlgorithmAndType() + public function modifyHeaderShouldChangeAlgorithm() { - $headers = []; + $headers = ['typ' => 'JWT']; $this->signer->modifyHeader($headers); - $this->assertEquals($headers['typ'], 'JWS'); + $this->assertEquals($headers['typ'], 'JWT'); $this->assertEquals($headers['alg'], 'TEST123'); }