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

[5.8] Send LogoutOtherDevices event when request is made. #27865

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
4 participants
@crynobone
Copy link
Contributor

crynobone commented Mar 12, 2019

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

[5.8] Send LogoutOtherDevices event when request is made.
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>

@crynobone crynobone force-pushed the crynobone:logout-other-devices-event branch from 5c5f5b0 to 7e6c443 Mar 12, 2019

protected function fireLogoutOtherDevicesEvent($user)
{
if (isset($this->events)) {
$this->events->dispatch(new Events\LogoutOtherDevices(

This comment has been minimized.

Copy link
@laurencei

laurencei Mar 12, 2019

Member

Should the namespace be imported at the top - then just new LogoutOtherDevices(... here?

This comment has been minimized.

Copy link
@crynobone

crynobone Mar 13, 2019

Author Contributor

I'm just following the other existing fire{EventName}Method structure in the class.

* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @return void
*/
public function __construct($guard, $user)

This comment has been minimized.

Copy link
@X-Coder264

X-Coder264 Mar 13, 2019

Contributor

Is there a reason that the user parameter here and in the fireLogoutOtherDevicesEvent method isn't actually typehinted?

This comment has been minimized.

Copy link
@crynobone

crynobone Mar 13, 2019

Author Contributor

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.

@taylorotwell

This comment has been minimized.

Copy link
Member

taylorotwell commented Mar 13, 2019

Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.