@@ -40,7 +40,7 @@ public function testParsePrivateKey()
40
40
);
41
41
42
42
$ jwkSet = json_decode (
43
- file_get_contents (__DIR__ . '/rsa-jwkset.json ' ),
43
+ file_get_contents (__DIR__ . '/data/ rsa-jwkset.json ' ),
44
44
true
45
45
);
46
46
$ jwkSet ['keys ' ][0 ]['d ' ] = 'privatekeyvalue ' ;
@@ -56,7 +56,7 @@ public function testParsePrivateKeyWithoutAlg()
56
56
);
57
57
58
58
$ jwkSet = json_decode (
59
- file_get_contents (__DIR__ . '/rsa-jwkset.json ' ),
59
+ file_get_contents (__DIR__ . '/data/ rsa-jwkset.json ' ),
60
60
true
61
61
);
62
62
unset($ jwkSet ['keys ' ][0 ]['alg ' ]);
@@ -67,7 +67,7 @@ public function testParsePrivateKeyWithoutAlg()
67
67
public function testParseKeyWithEmptyDValue ()
68
68
{
69
69
$ jwkSet = json_decode (
70
- file_get_contents (__DIR__ . '/rsa-jwkset.json ' ),
70
+ file_get_contents (__DIR__ . '/data/ rsa-jwkset.json ' ),
71
71
true
72
72
);
73
73
@@ -81,7 +81,7 @@ public function testParseKeyWithEmptyDValue()
81
81
public function testParseJwkKeySet ()
82
82
{
83
83
$ jwkSet = json_decode (
84
- file_get_contents (__DIR__ . '/rsa-jwkset.json ' ),
84
+ file_get_contents (__DIR__ . '/data/ rsa-jwkset.json ' ),
85
85
true
86
86
);
87
87
$ keys = JWK ::parseKeySet ($ jwkSet );
@@ -109,7 +109,7 @@ public function testParseJwkKeySet_empty()
109
109
*/
110
110
public function testDecodeByJwkKeySetTokenExpired ()
111
111
{
112
- $ privKey1 = file_get_contents (__DIR__ . '/rsa1-private.pem ' );
112
+ $ privKey1 = file_get_contents (__DIR__ . '/data/ rsa1-private.pem ' );
113
113
$ payload = array ('exp ' => strtotime ('-1 hour ' ));
114
114
$ msg = JWT ::encode ($ payload , $ privKey1 , 'RS256 ' , 'jwk1 ' );
115
115
@@ -123,7 +123,7 @@ public function testDecodeByJwkKeySetTokenExpired()
123
123
*/
124
124
public function testDecodeByJwkKeySet ()
125
125
{
126
- $ privKey1 = file_get_contents (__DIR__ . '/rsa1-private.pem ' );
126
+ $ privKey1 = file_get_contents (__DIR__ . '/data/ rsa1-private.pem ' );
127
127
$ payload = array ('sub ' => 'foo ' , 'exp ' => strtotime ('+10 seconds ' ));
128
128
$ msg = JWT ::encode ($ payload , $ privKey1 , 'RS256 ' , 'jwk1 ' );
129
129
@@ -137,7 +137,7 @@ public function testDecodeByJwkKeySet()
137
137
*/
138
138
public function testDecodeByMultiJwkKeySet ()
139
139
{
140
- $ privKey2 = file_get_contents (__DIR__ . '/rsa2-private.pem ' );
140
+ $ privKey2 = file_get_contents (__DIR__ . '/data/ rsa2-private.pem ' );
141
141
$ payload = array ('sub ' => 'bar ' , 'exp ' => strtotime ('+10 seconds ' ));
142
142
$ msg = JWT ::encode ($ payload , $ privKey2 , 'RS256 ' , 'jwk2 ' );
143
143
0 commit comments