Power_Automate_Provider::pre_dispatch_verification( mixed $result, TECEvent_AutomatorPower_AutomateWP_REST_Server $server, TECEvent_AutomatorPower_AutomateWP_REST_Request $request )
Verify token and login user before dispatching the request.
Contents
Done on rest_pre_dispatch to be able to set current user to pass validation capability checks.
Parameters
- $result
-
(mixed) (Required) Response to replace the requested version with. Can be anything a normal endpoint can return, or null to not hijack the request.
- $server
-
(TECEvent_AutomatorPower_AutomateWP_REST_Server) (Required) Server instance.
- $request
-
(TECEvent_AutomatorPower_AutomateWP_REST_Request) (Required) Request used to generate the response.
Return
(null) With always return null, failure will happen on the can_create permission check.
Source
File: src/Event_Automator/Power_Automate/Power_Automate_Provider.php
public function pre_dispatch_verification( $result, $server, $request ) {
return $this->container->make( Create_Events::class )->pre_dispatch_verification( $result, $server, $request );
}
Changelog
| Version | Description |
|---|---|
| 1.4.0 | Introduced. |