openclassify/addons/default/anomaly/users-module/docs/en/03.services/03.security.md
2024-08-18 18:40:44 +03:00

1.0 KiB

title
Security

Security

This section will introduce you to the security checker and how to use it.

User Security

This section will introduce the \Anomaly\UsersModule\User\UserSecurity class and how to use it.

UserSecurity::attempt()

The attempt method runs the security checks when an authentication attempt is performed.

Returns: \Illuminate\Http\RedirectResponse or true
Example
$result = $security->attemp();
UserSecurity::check()

The check method verifies that a user passes all the security checks.

Returns: \Illuminate\Http\RedirectResponse or true
Arguments
Key Required Type Default Description

$user

false

object

none

The user instance to check.

Example
$result = $security->check($user);