Authentication plugin with students controller and model rather than users

Refer below link
https://book.cakephp.org/4/en/tutorials-and-examples/cms/authentication.html

I wanted to use Authentication plugin with students controller and model rather than users.
Please can anyone guide me how to achieve it.

Hello,

It is possible to configure the identity resolver.
The configuration key “userModel” can be customized for your purposes.
See also Identifiers - 2.x

Example from my application - here I used my “adminstrators” model:

public function getAuthenticationService(ServerRequestInterface $request): AuthenticationServiceInterface
    {
    ...
     // Load identifiers
            $service->loadIdentifier('Authentication.Password', [
                'resolver' => [
                    'className' => 'Authentication.Orm',
                    'userModel' => 'Administrators',
                ],
                'fields' => [
                    'username' => ['username', 'email'],
                    'password' => 'password',
                ]
            ]);
...
}