Skip to content

Commit 89dac3a

Browse files
committed
add public and private key notes in the README.md file
1 parent b867910 commit 89dac3a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ The library implements JWT Verification and Signing using the following algorith
5050

5151
The Algorithm defines how a token is signed and verified. It can be instantiated with the raw value of the secret in the case of HMAC algorithms, or the key pairs or `KeyProvider` in the case of RSA and ECDSA algorithms. Once created, the instance is reusable for token signing and verification operations.
5252

53+
When using RSA or ECDSA algorithms and you just need to **sign** JWTs you can avoid specifying a Public Key by passing a `null` value. The same can be done with the Private Key when you just need to **verify** JWTs.
54+
55+
5356
#### Using static secrets or keys:
5457

5558
```java
@@ -91,7 +94,7 @@ RSAKeyProvider keyProvider = new RSAKeyProvider() {
9194
public RSAPrivateKey getPrivateKey() {
9295
return privateKey;
9396
}
94-
97+
9598
@Override
9699
public String getPrivateKeyId() {
97100
return privateKeyId;

0 commit comments

Comments
 (0)