Skip to content

Commit

Permalink
fix Ecdsa signers
Browse files Browse the repository at this point in the history
  • Loading branch information
mircobu authored Jul 9, 2021
1 parent 51307cf commit d622c59
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Providers/JWT/Lcobucci.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,11 @@ protected function getSigner()
if (! array_key_exists($this->algo, $this->signers)) {
throw new JWTException('The given algorithm could not be found');
}

// for ES256, ES384 and ES512 we need add a SignatureConverter into the constructor
if( str_starts_with( $this->algo, 'ES') ){
return $this->signers[$this->algo]::create();
}

return new $this->signers[$this->algo];
}
Expand Down

0 comments on commit d622c59

Please sign in to comment.