Skip to content

Commit 3b89903

Browse files
committed
refactor: removed unused headers
1 parent 125e3ca commit 3b89903

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

src/SSOTokenGenerator.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,19 @@ class SSOTokenGenerator
3636
*
3737
* @return string Encoded token.
3838
*/
39-
public static function createSignedTokenFromData(string $privateKey, array $tokenData, Signer $signer = null, array $headers = []): string
39+
public static function createSignedTokenFromData(string $privateKey, array $tokenData, Signer $signer = null): string
4040
{
4141

4242
$config = Configuration::forSymmetricSigner($signer ?: new Sha256(), InMemory::plainText($privateKey));
43-
return self::buildToken($config, $tokenData, $headers)->toString();
43+
return self::buildToken($config, $tokenData)->toString();
4444
}
4545

4646
/**
4747
* @param Configuration $config
4848
* @param array $tokenData
4949
* @return Token
5050
*/
51-
private static function buildToken(Configuration $config, array $tokenData, array $headers = []): Token
51+
private static function buildToken(Configuration $config, array $tokenData): Token
5252
{
5353
$builder = $config->builder();
5454
$token = $builder
@@ -80,10 +80,6 @@ private static function buildToken(Configuration $config, array $tokenData, arra
8080
$token = $token->withClaim($claim, $value);
8181
}
8282

83-
foreach ($headers as $header => $value) {
84-
$token = $token->withHeader($header, $value);
85-
}
86-
8783
return $token->getToken($config->signer(), $config->signingKey());
8884
}
8985
}

0 commit comments

Comments
 (0)