ADmad

Results 347 comments of ADmad

> I would say this is not a bug and won't fix. How is it not a bug when the class accepts GD resources as argument for the constructor but...

> While TokenAuthenticator responds with a 500 Error How did you end up with a 500 error? Authentication service does not throw any exception in case of authentication failure except...

If you are using the ~~AuthComponent~~`AuthenticationComponent` then it would throw a `UnauthenticatedException` if it doesn't find the identity in the request.

Sorry I meant the `AuthenticationComponent`. How/where are you loading the component?

You haven't answered my question how/where are you loading the **AuthenticationComponent**?

Are you making the `$this->Authentication->getIdentityData(...)` call also in a controller's `initialize()` method?

That doesn't make sense. Before the controller's action is called the `Controller.startup` event is triggered. `AuthenticationComponent::startup()` would be run for that event which calls `doIdentityCheck()` method which throws the `UnauthenticatedException`....

Redirection is now possible through 'unauthorizedHandler` added in #211

I didn't see this PR earlier. #211 adds the `unauthorizedHandler` to both the middlewares using a trait instead.

This can even be backported as narrowing the return type is covariant.