diff options
| author | winter | 2024-12-14 21:24:48 +0000 |
|---|---|---|
| committer | winter | 2024-12-14 21:45:59 +0000 |
| commit | 2f4c1de3509141880df019ef1a6cc65981b3f6ea (patch) | |
| tree | 0021f3a860d6c80869d4af5d366393f1d0eea288 /Digitigrade/Model/InstanceAuth.php | |
| parent | 0c6497ff02b8118bcefee37cc6fe0cbc02df4bb4 (diff) | |
implement outbound auth? untested
untested because i don't have another instance to test it against ....
Diffstat (limited to 'Digitigrade/Model/InstanceAuth.php')
| -rw-r--r-- | Digitigrade/Model/InstanceAuth.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Digitigrade/Model/InstanceAuth.php b/Digitigrade/Model/InstanceAuth.php new file mode 100644 index 0000000..616d4c5 --- /dev/null +++ b/Digitigrade/Model/InstanceAuth.php @@ -0,0 +1,21 @@ +<?php +namespace Digitigrade\Model; + +use Digitigrade\Model; + +class InstanceAuth extends Model { + public ?int $instanceId; + public ?string $outboundToken; + public ?string $inboundToken; + + protected function setOwnerId(int $id) { + $this->instanceId = $id; + } + + protected function getUpdateWhereClause($db): ?string { + if (self::findWhere('instance_id = ?', [$this->instanceId]) != null) { + return "instance_id = $this->instanceId"; + } + return null; + } +}
\ No newline at end of file |
