Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to set a custom response in case of authentication failure or invalid/not found token #157

Merged
merged 1 commit into from
Apr 7, 2016

Conversation

chalasr
Copy link
Collaborator

@chalasr chalasr commented Apr 5, 2016

Q A
Bug fix? yes
New feature? yes
BC breaks? no
Fixed tickets #153
Tests pass? yes

This make developers able to subscribe on the AUTHENTICATION_FAILURE / INVALID_JWT events.

The first is dispatched when the provider cannot retrieve/authenticate credentials sent to the login route.
The second (new) is dispatched when the listener cannot retrieve/authenticate a token on a secured route.

Tests and documentation have been updated.

…feature

Allow users to create an AuthenticationFailureListener and set a custom Response to the Events::AUTHENTICATION_FAILURE
Add Events::JWT_INVALID and allow users to listen on it and set a custom Response

Fix services

Replace JWTInvalidEvent|AuthenticationFailureEvent::setMessage() by setResponse(), Replace dispatcher constructor injection in favor of setter injection

Handle case of no token found as JWTInvalid

Update documentation for JWT_INVALID & AUTHENTICATION_FAILURE Events

Fix mistake in doc

remove duplicated code in JWTInvalidEvent by extending AuthenticationFailureEvent

Rollback lite comit squashing
@slashfan
Copy link
Contributor

slashfan commented Apr 7, 2016

OK to merge. Thanks !

@tjaari
Copy link

tjaari commented Apr 11, 2016

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants