Changeset View
Changeset View
Standalone View
Standalone View
src/app/AuthAttempt.php
Show All 11 Lines | |||||
* | * | ||||
* An AuthAttempt represents an authenticaton attempt from an application/client. | * An AuthAttempt represents an authenticaton attempt from an application/client. | ||||
*/ | */ | ||||
class AuthAttempt extends Model | class AuthAttempt extends Model | ||||
{ | { | ||||
use NullableFields; | use NullableFields; | ||||
use UuidStrKeyTrait; | use UuidStrKeyTrait; | ||||
// No specific reason | |||||
public const REASON_NONE = ''; | public const REASON_NONE = ''; | ||||
// Password mismatch | |||||
public const REASON_PASSWORD = 'password'; | public const REASON_PASSWORD = 'password'; | ||||
// Geolocation whitelist mismatch | |||||
public const REASON_GEOLOCATION = 'geolocation'; | public const REASON_GEOLOCATION = 'geolocation'; | ||||
public const REASON_NOTFOUND = 'notfound'; | |||||
public const REASON_2FA = '2fa'; | |||||
public const REASON_2FA_GENERIC = '2fa-generic'; | |||||
private const STATUS_ACCEPTED = 'ACCEPTED'; | private const STATUS_ACCEPTED = 'ACCEPTED'; | ||||
private const STATUS_DENIED = 'DENIED'; | private const STATUS_DENIED = 'DENIED'; | ||||
/** @var array<int, string> The attributes that can be not set */ | /** @var array<int, string> The attributes that can be not set */ | ||||
protected $nullable = ['reason']; | protected $nullable = ['reason']; | ||||
/** @var array<int, string> The attributes that are mass assignable */ | /** @var array<int, string> The attributes that are mass assignable */ | ||||
▲ Show 20 Lines • Show All 162 Lines • Show Last 20 Lines |