Auth

17 events in this category

stormnodes:auth:2fa:enabled

Callback parameters: array user info.

onAuth2FAEnabled

Event Data Structure

This event receives the following data when emitted:

user

Emitted from:

backend/app/Controllers/User/Auth/TwoFactorController.php

Usage Example

use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\AuthEvent;

public static function processEvents(PluginEvents $evt): void
{
    $evt->on(AuthEvent::onAuth2FAEnabled(), function ($user) {
        // Handle stormnodes:auth:2fa:enabled
        // Data keys: user
    });
}

stormnodes:auth:2fa:failed

Callback parameters: array user info.

onAuth2FAFailed

Event Data Structure

This event receives the following data when emitted:

ip_address
user

Emitted from:

backend/app/Controllers/User/Auth/TwoFactorController.php

Usage Example

use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\AuthEvent;

public static function processEvents(PluginEvents $evt): void
{
    $evt->on(AuthEvent::onAuth2FAFailed(), function ($ipAddress, $user) {
        // Handle stormnodes:auth:2fa:failed
        // Data keys: ip_address, user
    });
}

stormnodes:auth:2fa:setup

Callback parameters: array user info.

onAuth2FASetup

Event Data Structure

This event receives the following data when emitted:

user

Emitted from:

backend/app/Controllers/User/Auth/TwoFactorController.php

Usage Example

use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\AuthEvent;

public static function processEvents(PluginEvents $evt): void
{
    $evt->on(AuthEvent::onAuth2FASetup(), function ($user) {
        // Handle stormnodes:auth:2fa:setup
        // Data keys: user
    });
}

stormnodes:auth:2fa:verified

Callback parameters: array user info.

onAuth2FAVerified

Event Data Structure

This event receives the following data when emitted:

user

Emitted from:

backend/app/Controllers/User/Auth/TwoFactorController.php

Usage Example

use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\AuthEvent;

public static function processEvents(PluginEvents $evt): void
{
    $evt->on(AuthEvent::onAuth2FAVerified(), function ($user) {
        // Handle stormnodes:auth:2fa:verified
        // Data keys: user
    });
}

stormnodes:auth:account:locked

Callback parameters: array user info.

onAuthAccountLocked

Usage Example

use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\AuthEvent;

public static function processEvents(PluginEvents $evt): void
{
    $evt->on(AuthEvent::onAuthAccountLocked(), function ($info) {
        // Handle stormnodes:auth:account:locked
        // Parameters: array user info.
    });
}

stormnodes:auth:account:unlocked

Callback parameters: array user info.

onAuthAccountUnlocked

Usage Example

use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\AuthEvent;

public static function processEvents(PluginEvents $evt): void
{
    $evt->on(AuthEvent::onAuthAccountUnlocked(), function ($info) {
        // Handle stormnodes:auth:account:unlocked
        // Parameters: array user info.
    });
}

stormnodes:auth:email:changed

Callback parameters: array user info, string email.

onAuthEmailChanged

Usage Example

use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\AuthEvent;

public static function processEvents(PluginEvents $evt): void
{
    $evt->on(AuthEvent::onAuthEmailChanged(), function ($info, $email) {
        // Handle stormnodes:auth:email:changed
        // Parameters: array user info, string email.
    });
}

stormnodes:auth:forgot:password

Callback parameters: array user info, string reset_url, string reset_token.

onAuthForgotPassword

Event Data Structure

This event receives the following data when emitted:

ip_address
reset_token
reset_url
user

Emitted from:

backend/app/Controllers/User/Auth/ForgotPasswordController.php

Usage Example

use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\AuthEvent;

public static function processEvents(PluginEvents $evt): void
{
    $evt->on(AuthEvent::onAuthForgotPassword(), function ($ipAddress, $resetToken, $resetUrl, $user) {
        // Handle stormnodes:auth:forgot:password
        // Data keys: ip_address, reset_token, reset_url, user
    });
}

stormnodes:auth:forgot:password:failed

Callback parameters: string email, string reason.

onAuthForgotPasswordFailed

Event Data Structure

This event receives the following data when emitted:

email
ip_address
reason

Emitted from:

backend/app/Controllers/User/Auth/ForgotPasswordController.php

Usage Example

use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\AuthEvent;

public static function processEvents(PluginEvents $evt): void
{
    $evt->on(AuthEvent::onAuthForgotPasswordFailed(), function ($email, $ipAddress, $reason) {
        // Handle stormnodes:auth:forgot:password:failed
        // Data keys: email, ip_address, reason
    });
}

stormnodes:auth:login:failed

Callback parameters: array user info.

onAuthLoginFailed

Event Data Structure

This event receives the following data when emitted:

ip_address
reason
user
username_or_email

Emitted from:

backend/app/Controllers/User/Auth/LoginController.php

Usage Example

use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\AuthEvent;

public static function processEvents(PluginEvents $evt): void
{
    $evt->on(AuthEvent::onAuthLoginFailed(), function ($ipAddress, $reason, $user, $usernameOrEmail) {
        // Handle stormnodes:auth:login:failed
        // Data keys: ip_address, reason, user, username_or_email
    });
}

stormnodes:auth:login:success

Callback parameters: array user info.

onAuthLoginSuccess

Event Data Structure

This event receives the following data when emitted:

user

Emitted from:

backend/app/Controllers/User/Auth/LoginController.phpbackend/app/Controllers/User/Auth/RegisterController.php

+1 more location

Usage Example

use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\AuthEvent;

public static function processEvents(PluginEvents $evt): void
{
    $evt->on(AuthEvent::onAuthLoginSuccess(), function ($user) {
        // Handle stormnodes:auth:login:success
        // Data keys: user
    });
}

stormnodes:auth:logout

Callback parameters: array user info.

onAuthLogout

Usage Example

use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\AuthEvent;

public static function processEvents(PluginEvents $evt): void
{
    $evt->on(AuthEvent::onAuthLogout(), function ($info) {
        // Handle stormnodes:auth:logout
        // Parameters: array user info.
    });
}

stormnodes:auth:password:changed

Callback parameters: array user info.

onAuthPasswordChanged

Usage Example

use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\AuthEvent;

public static function processEvents(PluginEvents $evt): void
{
    $evt->on(AuthEvent::onAuthPasswordChanged(), function ($info) {
        // Handle stormnodes:auth:password:changed
        // Parameters: array user info.
    });
}

stormnodes:auth:password:reset:failed

Callback parameters: string email, string reason.

onAuthPasswordResetFailed

Event Data Structure

This event receives the following data when emitted:

ip_address
reason
token

Emitted from:

backend/app/Controllers/User/Auth/ResetPasswordController.php

Usage Example

use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\AuthEvent;

public static function processEvents(PluginEvents $evt): void
{
    $evt->on(AuthEvent::onAuthPasswordResetFailed(), function ($ipAddress, $reason, $token) {
        // Handle stormnodes:auth:password:reset:failed
        // Data keys: ip_address, reason, token
    });
}

stormnodes:auth:register:success

Callback parameters: array user info.

onAuthRegisterSuccess

Event Data Structure

This event receives the following data when emitted:

user

Emitted from:

backend/app/Controllers/User/Auth/RegisterController.php

Usage Example

use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\AuthEvent;

public static function processEvents(PluginEvents $evt): void
{
    $evt->on(AuthEvent::onAuthRegisterSuccess(), function ($user) {
        // Handle stormnodes:auth:register:success
        // Data keys: user
    });
}

stormnodes:auth:registration:failed

Callback parameters: string email, string reason.

onAuthRegistrationFailed

Event Data Structure

This event receives the following data when emitted:

email
ip_address
reason
username

Emitted from:

backend/app/Controllers/User/Auth/RegisterController.php

Usage Example

use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\AuthEvent;

public static function processEvents(PluginEvents $evt): void
{
    $evt->on(AuthEvent::onAuthRegistrationFailed(), function ($email, $ipAddress, $reason, $username) {
        // Handle stormnodes:auth:registration:failed
        // Data keys: email, ip_address, reason, username
    });
}

stormnodes:auth:reset:password:success

Callback parameters: array user info.

onAuthResetPasswordSuccess

Event Data Structure

This event receives the following data when emitted:

user

Emitted from:

backend/app/Controllers/User/Auth/ResetPasswordController.php

Usage Example

use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\AuthEvent;

public static function processEvents(PluginEvents $evt): void
{
    $evt->on(AuthEvent::onAuthResetPasswordSuccess(), function ($user) {
        // Handle stormnodes:auth:reset:password:success
        // Data keys: user
    });
}