added new composer libraries

This commit is contained in:
2021-02-11 20:21:58 +00:00
parent 0a11a5d23d
commit f8426666ee
40 changed files with 1175 additions and 10022 deletions
+3
View File
@@ -96,16 +96,19 @@ abstract class AbstractBuilder
public function alg($alg): self
{
$clone = clone $this;
switch (true) {
case $alg instanceof JoseAlgorithm:
$clone->algorithms[] = $alg;
$clone->jwt->header->set('alg', $alg->name());
break;
case is_string($alg):
$clone->jwt->header->set('alg', $alg);
break;
default:
throw new InvalidArgumentException('Invalid parameter "alg". Shall be a string or an algorithm instance.');
}