Comments (7)
Yes you can do that already.
from authentication.
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.
What stack trace do you get in your error?
from authentication.
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.
I hope that's what you're after unless there is more detail I can provide you?
from authentication.
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.
Ahh awesome, thanks for that and yep that worked a treat 👍
from authentication.
Related Issues (20)
- update docs links
- FAILURE_IDENTITY_NOT_FOUND HOT 1
- update src folder links
- update test folder links
- update links root folder
- Issue when using Authentication Plugin and DebugKit in Dev Environments HOT 4
- SessionAuthenticator `'identify' => true` config does not work HOT 16
- zend-diactoros require php ^7.1 -> your php version (8.1.10) HOT 3
- Impersonate issue with serialization for session
- Multiple table/model fields HOT 2
- `isLoggedIn()` in a Controller? HOT 2
- v3 docs need to be built/deployed HOT 3
- Reduce constraint for psr/http-message HOT 5
- allowUnauthenticated() for all actions HOT 3
- Feature request: Make Authentication service available via DI in the Middleware
- Impersonation for non-persistent authenticators HOT 23
- Session Identifier forces use of 'username' array key
- LDAP identifier is not compatible with php 8.3
- LoginLink functionality HOT 3
- Use Authentication into Cell HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from authentication.