Skip to content

Commit

Permalink
Update configuration.md
Browse files Browse the repository at this point in the history
Update configuration docs to match current code implementation.
  • Loading branch information
lots0logs committed Jan 15, 2021
1 parent 6713571 commit 139a7a0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docs/configuration.md
Expand Up @@ -19,7 +19,7 @@ In order to use it, you must:

### Configuration initialisation

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

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

Expand Down Expand Up @@ -81,9 +81,11 @@ use Lcobucci\JWT\Signer;
use Lcobucci\JWT\Signer\Key\LocalFileReference;
use Lcobucci\JWT\Signer\Key\InMemory;

// You may use RSA OR ECDSA and all their variations (256, 384, and 512) and EdDSA over Curve25519
$signer = new Signer\Rsa\Sha512();
$signer = Signer\Ecdsa\Sha512::create();
$configuration = Configuration::forAsymmetricSigner(
// You may use RSA or ECDSA and all their variations (256, 384, and 512) and EdDSA over Curve25519
new Signer\Rsa\Sha256(),
$signer,
LocalFileReference::file(__DIR__ . '/my-private-key.pem'),
InMemory::base64Encoded('mBC5v1sOKVvbdEitdSBenu59nfNfhwkedkJVNabosTw=')
// You may also override the JOSE encoder/decoder if needed by providing extra arguments here
Expand Down

0 comments on commit 139a7a0

Please sign in to comment.