-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathAbstractRemoteCallHandler.php
More file actions
49 lines (45 loc) · 1.18 KB
/
AbstractRemoteCallHandler.php
File metadata and controls
49 lines (45 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
declare(strict_types=1);
/**
* Abstract remote handler implementation, based on this doc:
* https://developers.staffbase.com/api/plugin-sso/
*
* @category Authentication
* @copyright 2017-2025 Staffbase SE.
* @author Vitaliy Ivanov
* @license http://www.apache.org/licenses/LICENSE-2.0
* @link https://github.com/staffbase/plugins-sdk-php
*/
namespace Staffbase\plugins\sdk\RemoteCall;
/**
* class AbstractRemoteCallHandler
*
* An Abstract RemoteCallHandler implementation
* which can be used in conjunction with all
* remote call interfaces
*
* @package Staffbase\plugins\sdk\RemoteCall
*/
abstract class AbstractRemoteCallHandler implements RemoteCallInterface
{
/**
* Stop the execution by providing a 2XX HTTP response
*
* This will tell Staffbase that everything went OK.
*/
public function exitSuccess(): void
{
header("HTTP/1.1 200 OK");
exit;
}
/**
* Stop the execution by providing a 5XX HTTP response
*
* This will tell Staffbase that it should try again later.
*/
public function exitFailure(): void
{
header('HTTP/1.1 500 Internal Server Error');
exit;
}
}