Viraj Khatavkar
Viraj Khatavkar
@ADmad I am not using the `AuthComponent` - here's an example response with the `TokenAuthenticator` when a wrong token is passed
@ADmad I am doing it like this: ```php ### Application.php::getAuthenticationService $service->loadIdentifier('Authentication.Token', [ 'tokenField' => 'api_key' ]); $service->loadAuthenticator('Authentication.Token', [ 'queryParam' => 'token', 'header' => 'Authorization', 'tokenPrefix' => 'Bearer' ]); ```
@ADmad I think I found the issue: even if the `Result::FAILURE_IDENTITY_NOT_FOUND` is returned from `TokenAuthenticator` the process goes on to the app's `XyzController` and it was failing there at `$this->Authentication->getIdentityData(...)`...
Due to which the `AuthenticationMiddleware` continues it's call to the `startupProcess` of controller
@ADmad sorry, I am loading it in the `AppController::initialize` method: ```php $this->loadComponent('Authentication.Authentication', [ 'logoutRedirect' => '/' // Default is false ]); ```
@ADmad nope, it's in a normal get method
let me check that flow once
@markstory after following the `stackTrace()` it seems that it is failing at Authorization, but it shouldn't actually receive Authroization and fail at Authention itself - so still trying to figure...
@opheliadesign is it creating same slug if count of slug is not present at end ?
okay will look at it and revert in some time