allow vendord
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 3m3s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 16s
Build, Push and Deploy / deploy-staging (push) Successful in 32s
Build, Push and Deploy / deploy-production (push) Has been skipped
Build, Push and Deploy / cleanup (push) Successful in 1s
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 3m3s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 16s
Build, Push and Deploy / deploy-staging (push) Successful in 32s
Build, Push and Deploy / deploy-production (push) Has been skipped
Build, Push and Deploy / cleanup (push) Successful in 1s
This commit is contained in:
57
vendor/kreait/firebase-tokens/src/JWT/SecureToken.php
vendored
Normal file
57
vendor/kreait/firebase-tokens/src/JWT/SecureToken.php
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Kreait\Firebase\JWT;
|
||||
|
||||
use Kreait\Firebase\JWT\Contract\Token;
|
||||
use Stringable;
|
||||
|
||||
final class SecureToken implements Token, Stringable
|
||||
{
|
||||
/**
|
||||
* @param array<string, mixed> $headers
|
||||
* @param array<string, mixed> $payload
|
||||
*/
|
||||
private function __construct(
|
||||
private readonly string $encodedString,
|
||||
private readonly array $headers,
|
||||
private readonly array $payload,
|
||||
) {
|
||||
}
|
||||
|
||||
public function __toString(): string
|
||||
{
|
||||
return $this->encodedString;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<string, mixed> $headers
|
||||
* @param array<string, mixed> $payload
|
||||
*/
|
||||
public static function withValues(string $encodedString, array $headers, array $payload): self
|
||||
{
|
||||
return new self($encodedString, $headers, $payload);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function headers(): array
|
||||
{
|
||||
return $this->headers;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function payload(): array
|
||||
{
|
||||
return $this->payload;
|
||||
}
|
||||
|
||||
public function toString(): string
|
||||
{
|
||||
return $this->encodedString;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user