1
0
Fork 0
forked from mirror/pixelfed

Add ActivityPub Move validator

This commit is contained in:
Daniel Supernault 2024-09-07 02:46:11 -06:00
parent 42424028b0
commit 909a6c725b
No known key found for this signature in database
GPG key ID: 23740873EE6F76A1

View file

@ -0,0 +1,23 @@
<?php
namespace App\Util\ActivityPub\Validator;
use Illuminate\Validation\Rule;
use Validator;
class MoveValidator
{
public static function validate($payload)
{
return Validator::make($payload, [
'@context' => 'required',
'type' => [
'required',
Rule::in(['Move']),
],
'actor' => 'required|url',
'object' => 'required|url',
'target' => 'required|url',
])->passes();
}
}