We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d089a3a commit c595e2bCopy full SHA for c595e2b
tests/JWTTest.php
@@ -194,6 +194,14 @@ public function testKIDChooser()
194
$this->assertEquals($decoded, 'abc');
195
}
196
197
+ public function testArrayAccessKIDChooser()
198
+ {
199
+ $keys = new ArrayObject(array('1' => 'my_key', '2' => 'my_key2'));
200
+ $msg = JWT::encode('abc', $keys['1'], 'HS256', '1');
201
+ $decoded = JWT::decode($msg, $keys, array('HS256'));
202
+ $this->assertEquals($decoded, 'abc');
203
+ }
204
+
205
public function testNoneAlgorithm()
206
{
207
$msg = JWT::encode('abc', 'my_key');
0 commit comments