Skip to content

Commit b80c487

Browse files
authored
Merge pull request #632 from lots0logs/patch-1
Use the correct class name for in-memory keys in documentation
2 parents d4bfa6b + 137a65d commit b80c487

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/configuration.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ In order to use it, you must:
1919

2020
### Configuration initialisation
2121

22-
The `Lcobucci\JWT\Signer\Key` object is used for symmetric/asymmetric signature.
22+
The `Lcobucci\JWT\Signer\Key\InMemory` object is used for symmetric/asymmetric signature.
2323

2424
To initialise it, you can pass the key content as a plain text:
2525

@@ -83,13 +83,17 @@ use Lcobucci\JWT\Signer\Key\InMemory;
8383

8484
$configuration = Configuration::forAsymmetricSigner(
8585
// You may use RSA or ECDSA and all their variations (256, 384, and 512)
86-
new Signer\RSA\Sha256(),
86+
new Signer\Rsa\Sha256(),
8787
LocalFileReference::file(__DIR__ . '/my-private-key.pem'),
8888
InMemory::base64Encoded('mBC5v1sOKVvbdEitdSBenu59nfNfhwkedkJVNabosTw=')
8989
// You may also override the JOSE encoder/decoder if needed by providing extra arguments here
9090
);
9191
```
9292

93+
!!! Important
94+
The implementation of ECDSA algorithms have a constructor dependency.
95+
Use the `create()` named constructor to avoid having to handle it (e.g.: `Lcobucci\JWT\Signer\Ecdsa\Sha256::create()`).
96+
9397
#### For no algorithm
9498

9599
!!! Warning

0 commit comments

Comments
 (0)