File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
src/Authentication/Authenticators Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 77use CodeIgniter \Shield \Authentication \AuthenticationException ;
88use CodeIgniter \Shield \Authentication \AuthenticatorInterface ;
99use CodeIgniter \Shield \Entities \User ;
10- use CodeIgniter \Shield \Models \LoginModel ;
10+ use CodeIgniter \Shield \Models \TokenLoginModel ;
1111use CodeIgniter \Shield \Models \UserIdentityModel ;
1212use CodeIgniter \Shield \Models \UserModel ;
1313use CodeIgniter \Shield \Result ;
@@ -21,15 +21,15 @@ class AccessTokens implements AuthenticatorInterface
2121 protected UserModel $ provider ;
2222
2323 protected ?User $ user = null ;
24- protected LoginModel $ loginModel ;
24+ protected TokenLoginModel $ loginModel ;
2525
2626 public function __construct (UserModel $ provider )
2727 {
2828 helper ('session ' );
2929
3030 $ this ->provider = $ provider ;
3131
32- $ this ->loginModel = model (LoginModel ::class); // @phpstan-ignore-line
32+ $ this ->loginModel = model (TokenLoginModel ::class); // @phpstan-ignore-line
3333 }
3434
3535 /**
Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ public function testAttemptCannotFindUser()
168168 $ this ->assertSame (lang ('Auth.badToken ' ), $ result ->reason ());
169169
170170 // A login attempt should have always been recorded
171- $ this ->seeInDatabase ('auth_logins ' , [
171+ $ this ->seeInDatabase ('auth_token_logins ' , [
172172 'identifier ' => 'token: abc123 ' ,
173173 'success ' => 0 ,
174174 ]);
@@ -195,7 +195,7 @@ public function testAttemptSuccess()
195195 $ this ->assertSame ($ token ->token , $ foundUser ->currentAccessToken ()->token );
196196
197197 // A login attempt should have been recorded
198- $ this ->seeInDatabase ('auth_logins ' , [
198+ $ this ->seeInDatabase ('auth_token_logins ' , [
199199 'identifier ' => 'token: ' . $ token ->raw_token ,
200200 'success ' => 1 ,
201201 ]);
You can’t perform that action at this time.
0 commit comments