__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
namespace Lcobucci\JWT;
use Closure;
use Lcobucci\JWT\Parsing\Decoder;
use Lcobucci\JWT\Parsing\Encoder;
use Lcobucci\JWT\Signer\Key;
use Lcobucci\JWT\Signer\Key\InMemory;
use Lcobucci\JWT\Signer\None;
use Lcobucci\JWT\Validation\Constraint;
/**
* Configuration container for the JWT Builder and Parser
*
* Serves like a small DI container to simplify the creation and usage
* of the objects.
*/
final class Configuration
{
/** @var Parser */
private $parser;
/** @var Signer */
private $signer;
/** @var Key */
private $signingKey;
/** @var Key */
private $verificationKey;
/** @var Validator */
private $validator;
/** @var Closure(): Builder */
private $builderFactory;
/** @var Constraint[] */
private $validationConstraints = [];
private function __construct(
Signer $signer,
Key $signingKey,
Key $verificationKey,
Encoder $encoder = null,
Decoder $decoder = null
) {
$this->signer = $signer;
$this->signingKey = $signingKey;
$this->verificationKey = $verificationKey;
$this->parser = new Parser($decoder ?: new Decoder());
$this->validator = new Validation\Validator();
$this->builderFactory = static function () use ($encoder) {
return new Builder($encoder ?: new Encoder());
};
}
/** @return self */
public static function forAsymmetricSigner(
Signer $signer,
Key $signingKey,
Key $verificationKey,
Encoder $encoder = null,
Decoder $decoder = null
) {
return new self(
$signer,
$signingKey,
$verificationKey,
$encoder,
$decoder
);
}
/** @return self */
public static function forSymmetricSigner(
Signer $signer,
Key $key,
Encoder $encoder = null,
Decoder $decoder = null
) {
return new self(
$signer,
$key,
$key,
$encoder,
$decoder
);
}
/** @return self */
public static function forUnsecuredSigner(
Encoder $encoder = null,
Decoder $decoder = null
) {
$key = InMemory::plainText('');
return new self(
new None(),
$key,
$key,
$encoder,
$decoder
);
}
/** @param callable(): Builder $builderFactory */
public function setBuilderFactory(callable $builderFactory)
{
if (! $builderFactory instanceof Closure) {
$builderFactory = static function() use ($builderFactory) {
return $builderFactory();
};
}
$this->builderFactory = $builderFactory;
}
/** @return Builder */
public function builder()
{
$factory = $this->builderFactory;
return $factory();
}
/** @return Parser */
public function parser()
{
return $this->parser;
}
public function setParser(Parser $parser)
{
$this->parser = $parser;
}
/** @return Signer */
public function signer()
{
return $this->signer;
}
/** @return Key */
public function signingKey()
{
return $this->signingKey;
}
/** @return Key */
public function verificationKey()
{
return $this->verificationKey;
}
/** @return Validator */
public function validator()
{
return $this->validator;
}
public function setValidator(Validator $validator)
{
$this->validator = $validator;
}
/** @return Constraint[] */
public function validationConstraints()
{
return $this->validationConstraints;
}
public function setValidationConstraints(Constraint ...$validationConstraints)
{
$this->validationConstraints = $validationConstraints;
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| Claim | Folder | 0775 |
|
|
| Encoding | Folder | 0775 |
|
|
| Parsing | Folder | 0775 |
|
|
| Signer | Folder | 0775 |
|
|
| Token | Folder | 0775 |
|
|
| Validation | Folder | 0775 |
|
|
| Builder.php | File | 14.81 KB | 0664 |
|
| Claim.php | File | 732 B | 0664 |
|
| Configuration.php | File | 3.89 KB | 0664 |
|
| Exception.php | File | 165 B | 0664 |
|
| Parser.php | File | 4.22 KB | 0664 |
|
| Signature.php | File | 1.72 KB | 0664 |
|
| Signer.php | File | 1.26 KB | 0664 |
|
| Token.php | File | 9.97 KB | 0664 |
|
| ValidationData.php | File | 2.66 KB | 0664 |
|
| Validator.php | File | 515 B | 0664 |
|