forked from simplesamlphp/simplesamlphp-module-oidc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIssuerStateRule.php
More file actions
36 lines (31 loc) · 1.15 KB
/
IssuerStateRule.php
File metadata and controls
36 lines (31 loc) · 1.15 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
<?php
declare(strict_types=1);
namespace SimpleSAML\Module\oidc\Server\RequestRules\Rules;
use Psr\Http\Message\ServerRequestInterface;
use SimpleSAML\Module\oidc\Server\RequestRules\Interfaces\ResultBagInterface;
use SimpleSAML\Module\oidc\Server\RequestRules\Interfaces\ResultInterface;
use SimpleSAML\Module\oidc\Server\RequestRules\Result;
use SimpleSAML\Module\oidc\Services\LoggerService;
use SimpleSAML\OpenID\Codebooks\HttpMethodsEnum;
use SimpleSAML\OpenID\Codebooks\ParamsEnum;
class IssuerStateRule extends AbstractRule
{
/**
* @inheritDoc
*/
public function checkRule(
ServerRequestInterface $request,
ResultBagInterface $currentResultBag,
LoggerService $loggerService,
array $data = [],
bool $useFragmentInHttpErrorResponses = false,
array $allowedServerRequestMethods = [HttpMethodsEnum::GET],
): ?ResultInterface {
$issuerState = $this->requestParamsResolver->getAsStringBasedOnAllowedMethods(
ParamsEnum::IssuerState->value,
$request,
$allowedServerRequestMethods,
);
return new Result($this->getKey(), $issuerState);
}
}