summaryrefslogtreecommitdiffstats
path: root/vendor/web-token/jwt-signature/JWSTokenSupport.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/web-token/jwt-signature/JWSTokenSupport.php')
-rw-r--r--vendor/web-token/jwt-signature/JWSTokenSupport.php76
1 files changed, 38 insertions, 38 deletions
diff --git a/vendor/web-token/jwt-signature/JWSTokenSupport.php b/vendor/web-token/jwt-signature/JWSTokenSupport.php
index 667f3fc..8fb3137 100644
--- a/vendor/web-token/jwt-signature/JWSTokenSupport.php
+++ b/vendor/web-token/jwt-signature/JWSTokenSupport.php
@@ -1,38 +1,38 @@
-<?php
-
-declare(strict_types=1);
-
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2014-2018 Spomky-Labs
- *
- * This software may be modified and distributed under the terms
- * of the MIT license. See the LICENSE file for details.
- */
-
-namespace Jose\Component\Signature;
-
-use Jose\Component\Checker\TokenTypeSupport;
-use Jose\Component\Core\JWT;
-
-final class JWSTokenSupport implements TokenTypeSupport
-{
- public function supports(JWT $jwt): bool
- {
- return $jwt instanceof JWS;
- }
-
- public function retrieveTokenHeaders(JWT $jwt, int $index, array &$protectedHeader, array &$unprotectedHeader): void
- {
- if (!$jwt instanceof JWS) {
- return;
- }
-
- if ($index > $jwt->countSignatures()) {
- throw new \InvalidArgumentException('Unknown signature index.');
- }
- $protectedHeader = $jwt->getSignature($index)->getProtectedHeader();
- $unprotectedHeader = $jwt->getSignature($index)->getHeader();
- }
-}
+<?php
+
+declare(strict_types=1);
+
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2014-2018 Spomky-Labs
+ *
+ * This software may be modified and distributed under the terms
+ * of the MIT license. See the LICENSE file for details.
+ */
+
+namespace Jose\Component\Signature;
+
+use Jose\Component\Checker\TokenTypeSupport;
+use Jose\Component\Core\JWT;
+
+final class JWSTokenSupport implements TokenTypeSupport
+{
+ public function supports(JWT $jwt): bool
+ {
+ return $jwt instanceof JWS;
+ }
+
+ public function retrieveTokenHeaders(JWT $jwt, int $index, array &$protectedHeader, array &$unprotectedHeader): void
+ {
+ if (!$jwt instanceof JWS) {
+ return;
+ }
+
+ if ($index > $jwt->countSignatures()) {
+ throw new \InvalidArgumentException('Unknown signature index.');
+ }
+ $protectedHeader = $jwt->getSignature($index)->getProtectedHeader();
+ $unprotectedHeader = $jwt->getSignature($index)->getHeader();
+ }
+}