23 lines
481 B
PHP
23 lines
481 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Support\Livewire\TrustedState;
|
|
|
|
enum TrustedStateClass: string
|
|
{
|
|
case Presentation = 'presentation';
|
|
case LockedIdentity = 'locked_identity';
|
|
case ServerDerivedAuthority = 'server_derived_authority';
|
|
|
|
public function allowsClientMutation(): bool
|
|
{
|
|
return $this === self::Presentation;
|
|
}
|
|
|
|
public function requiresServerRevalidation(): bool
|
|
{
|
|
return $this !== self::Presentation;
|
|
}
|
|
}
|