Files
einundzwanzig-verein/app/Auth/NostrUser.php
HolgerHatGarKeineNode 7a992cec3f - Refactor edit.blade.php to handle admin-specific fields (accepted and sats_paid) through conditional logic.
- 📦 Upgrade Laravel framework, Livewire, and dependencies to ensure compatibility with version `13.1.1`.
2026-03-23 17:50:17 +00:00

67 lines
1.1 KiB
PHP

<?php
namespace App\Auth;
use App\Models\EinundzwanzigPleb;
use Illuminate\Contracts\Auth\Authenticatable;
class NostrUser implements Authenticatable
{
protected string $pubkey;
protected ?object $pleb;
public function __construct(string $pubkey)
{
$this->pubkey = $pubkey;
$this->pleb = EinundzwanzigPleb::query()
->where('pubkey', $pubkey)
->first();
}
public function getAuthIdentifierName(): string
{
return 'pubkey';
}
public function getAuthIdentifier(): string
{
return $this->pubkey;
}
public function getAuthPassword(): string
{
return '';
}
public function getRememberToken(): ?string
{
return null;
}
public function setRememberToken($value): void
{
//
}
public function getRememberTokenName(): ?string
{
return null;
}
public function getAuthPasswordName(): string
{
return 'password';
}
public function getPubkey(): string
{
return $this->pubkey;
}
public function getPleb(): ?object
{
return $this->pleb;
}
}