Giter VIP home page Giter VIP logo

Comments (7)

markstory avatar markstory commented on May 13, 2024 2

Yes you can do that already.

from authentication.

markstory avatar markstory commented on May 13, 2024 1

That's good. Looks like the documentation is not very clear on this scenario. The identifiers no longer take a 'userModel' option. That has been separated out into a 'resolver'. Your identifier configuration should look like:

$service->loadIdentifier('Authentication.Password', [
  'resolver' => [
    'className' => 'Authentication.Orm'
    'userModel' => 'Employees',
  ],
  'fields' => [
    'username' => 'login',
    'password' => 'password',
  ],
]);

I'll get the documentation updated.

from authentication.

markstory avatar markstory commented on May 13, 2024

What stack trace do you get in your error?

from authentication.

b1scuit avatar b1scuit commented on May 13, 2024

Is there any way I can get a better stack trace out?

⟩ Cake\Database\Schema\Collection->_reflect
CORE/src/Database/Schema/Collection.php, line 97
⟩ Cake\Database\Schema\Collection->describe
CORE/src/Database/Schema/CachedCollection.php, line 63
⟩ Cake\Database\Schema\CachedCollection->describe
CORE/src/ORM/Table.php, line 532
⟩ Cake\ORM\Table->getSchema
CORE/src/ORM/Query.php, line 211
⟩ Cake\ORM\Query->addDefaultTypes
CORE/src/ORM/Query.php, line 168
⟩ Cake\ORM\Query->__construct
CORE/src/ORM/Table.php, line 1578
⟩ Cake\ORM\Table->query
ROOT/vendor/cakephp/authentication/src/Identifier/Resolver/OrmResolver.php, line 56
⟩ Authentication\Identifier\Resolver\OrmResolver->find
ROOT/vendor/cakephp/authentication/src/Identifier/PasswordIdentifier.php, line 153
⟩ Authentication\Identifier\PasswordIdentifier->_findUser
ROOT/vendor/cakephp/authentication/src/Identifier/PasswordIdentifier.php, line 119
⟩ Authentication\Identifier\PasswordIdentifier->_findIdentity
ROOT/vendor/cakephp/authentication/src/Identifier/PasswordIdentifier.php, line 104
⟩ Authentication\Identifier\PasswordIdentifier->identify
ROOT/vendor/cakephp/authentication/src/Identifier/IdentifierCollection.php, line 38
⟩ Authentication\Identifier\IdentifierCollection->identify
ROOT/vendor/cakephp/authentication/src/Authenticator/FormAuthenticator.php, line 83
⟩ Authentication\Authenticator\FormAuthenticator->authenticate
ROOT/vendor/cakephp/authentication/src/AuthenticationService.php, line 172
⟩ Authentication\AuthenticationService->authenticate
ROOT/vendor/cakephp/authentication/src/Middleware/AuthenticationMiddleware.php, line 56
⟩ Authentication\Middleware\AuthenticationMiddleware->__invoke
CORE/src/Http/Runner.php, line 65
⟩ Cake\Http\Runner->__invoke
ROOT/vendor/cakephp/debug_kit/src/Middleware/DebugKitMiddleware.php, line 52
⟩ DebugKit\Middleware\DebugKitMiddleware->__invoke
CORE/src/Http/Runner.php, line 65
⟩ Cake\Http\Runner->__invoke
CORE/src/Http/Runner.php, line 51
⟩ Cake\Http\Runner->run
CORE/src/Http/Server.php, line 81
⟩ Cake\Http\Server->run
ROOT/webroot/index.php, line 40

from authentication.

b1scuit avatar b1scuit commented on May 13, 2024

I hope that's what you're after unless there is more detail I can provide you?

from authentication.

inoas avatar inoas commented on May 13, 2024

Would it be possible to use FQNS? like Employees::class and Authentication\Orm::class and Authentication\Password::class, if that is not already possible?

If already possible, should be the default documented way as it rules out typo problems I assume?

from authentication.

b1scuit avatar b1scuit commented on May 13, 2024

Ahh awesome, thanks for that and yep that worked a treat 👍

from authentication.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.