@@ -50,13 +50,13 @@ public function testGettingAccessTokenWithClientCredentialsGrant()
50
50
$ user ->save ();
51
51
52
52
/** @var Client $client */
53
- $ client = ClientFactory::new ()->asClientCredentials ()->create (['user_id ' => $ user ->id ]);
53
+ $ client = ClientFactory::new ()->asClientCredentials ()->create (['user_id ' => $ user ->getKey () ]);
54
54
55
55
$ response = $ this ->post (
56
56
'/oauth/token ' ,
57
57
[
58
58
'grant_type ' => 'client_credentials ' ,
59
- 'client_id ' => $ client ->id ,
59
+ 'client_id ' => $ client ->getKey () ,
60
60
'client_secret ' => $ client ->secret ,
61
61
]
62
62
);
@@ -93,13 +93,13 @@ public function testGettingAccessTokenWithClientCredentialsGrantInvalidClientSec
93
93
$ user ->save ();
94
94
95
95
/** @var Client $client */
96
- $ client = ClientFactory::new ()->asClientCredentials ()->create (['user_id ' => $ user ->id ]);
96
+ $ client = ClientFactory::new ()->asClientCredentials ()->create (['user_id ' => $ user ->getKey () ]);
97
97
98
98
$ response = $ this ->post (
99
99
'/oauth/token ' ,
100
100
[
101
101
'grant_type ' => 'client_credentials ' ,
102
- 'client_id ' => $ client ->id ,
102
+ 'client_id ' => $ client ->getKey () ,
103
103
'client_secret ' => $ client ->secret .'foo ' ,
104
104
]
105
105
);
@@ -137,13 +137,13 @@ public function testGettingAccessTokenWithPasswordGrant()
137
137
$ user ->save ();
138
138
139
139
/** @var Client $client */
140
- $ client = ClientFactory::new ()->asPasswordClient ()->create (['user_id ' => $ user ->id ]);
140
+ $ client = ClientFactory::new ()->asPasswordClient ()->create (['user_id ' => $ user ->getKey () ]);
141
141
142
142
$ response = $ this ->post (
143
143
'/oauth/token ' ,
144
144
[
145
145
'grant_type ' => 'password ' ,
146
- 'client_id ' => $ client ->id ,
146
+ 'client_id ' => $ client ->getKey () ,
147
147
'client_secret ' => $ client ->secret ,
148
148
'username ' => $ user ->email ,
149
149
'password ' => $ password ,
@@ -184,13 +184,13 @@ public function testGettingAccessTokenWithPasswordGrantWithInvalidPassword()
184
184
$ user ->save ();
185
185
186
186
/** @var Client $client */
187
- $ client = ClientFactory::new ()->asPasswordClient ()->create (['user_id ' => $ user ->id ]);
187
+ $ client = ClientFactory::new ()->asPasswordClient ()->create (['user_id ' => $ user ->getKey () ]);
188
188
189
189
$ response = $ this ->post (
190
190
'/oauth/token ' ,
191
191
[
192
192
'grant_type ' => 'password ' ,
193
- 'client_id ' => $ client ->id ,
193
+ 'client_id ' => $ client ->getKey () ,
194
194
'client_secret ' => $ client ->secret ,
195
195
'username ' => $ user ->email ,
196
196
'password ' => $ password .'foo ' ,
@@ -227,13 +227,13 @@ public function testGettingAccessTokenWithPasswordGrantWithInvalidClientSecret()
227
227
$ user ->save ();
228
228
229
229
/** @var Client $client */
230
- $ client = ClientFactory::new ()->asPasswordClient ()->create (['user_id ' => $ user ->id ]);
230
+ $ client = ClientFactory::new ()->asPasswordClient ()->create (['user_id ' => $ user ->getKey () ]);
231
231
232
232
$ response = $ this ->post (
233
233
'/oauth/token ' ,
234
234
[
235
235
'grant_type ' => 'password ' ,
236
- 'client_id ' => $ client ->id ,
236
+ 'client_id ' => $ client ->getKey () ,
237
237
'client_secret ' => $ client ->secret .'foo ' ,
238
238
'username ' => $ user ->email ,
239
239
'password ' => $ password ,
@@ -274,13 +274,13 @@ public function testGettingCustomResponseType()
274
274
$ user ->save ();
275
275
276
276
/** @var Client $client */
277
- $ client = ClientFactory::new ()->asClientCredentials ()->create (['user_id ' => $ user ->id ]);
277
+ $ client = ClientFactory::new ()->asClientCredentials ()->create (['user_id ' => $ user ->getKey () ]);
278
278
279
279
$ response = $ this ->post (
280
280
'/oauth/token ' ,
281
281
[
282
282
'grant_type ' => 'client_credentials ' ,
283
- 'client_id ' => $ client ->id ,
283
+ 'client_id ' => $ client ->getKey () ,
284
284
'client_secret ' => $ client ->secret ,
285
285
]
286
286
);
0 commit comments