[5.8] Send LogoutOtherDevices event when request is made.#27865
Closed
crynobone wants to merge 1 commit into
Closed
[5.8] Send LogoutOtherDevices event when request is made.#27865crynobone wants to merge 1 commit into
crynobone wants to merge 1 commit into
Conversation
This would allow developers to manages other authentications to react to this request such as `Passport`, where the application may choose to revoke all users access_token etc. Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
5c5f5b0 to
7e6c443
Compare
laurencei
reviewed
Mar 12, 2019
| protected function fireLogoutOtherDevicesEvent($user) | ||
| { | ||
| if (isset($this->events)) { | ||
| $this->events->dispatch(new Events\LogoutOtherDevices( |
Contributor
There was a problem hiding this comment.
Should the namespace be imported at the top - then just new LogoutOtherDevices(... here?
Member
Author
There was a problem hiding this comment.
I'm just following the other existing fire{EventName}Method structure in the class.
X-Coder264
reviewed
Mar 13, 2019
| * @param \Illuminate\Contracts\Auth\Authenticatable $user | ||
| * @return void | ||
| */ | ||
| public function __construct($guard, $user) |
Contributor
There was a problem hiding this comment.
Is there a reason that the user parameter here and in the fireLogoutOtherDevicesEvent method isn't actually typehinted?
Member
Author
There was a problem hiding this comment.
None of the existing Auth event has a type-hint. If you want that feel free to make a different PR to suggest those changes. I don't want to bloat this PR to add huge changes just to be rejected.
Member
|
Merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This would allow developers to manages other authentications to react to this request
such as
Passport, where the application may choose to revoke all users access_token etc.Signed-off-by: Mior Muhammad Zaki crynobone@gmail.com