Skip to content

Commit f84a28b

Browse files
fixing readme
1 parent 4b9ff6d commit f84a28b

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,17 +92,18 @@ String authHeader = OAuth.getAuthorizationHeader(uri, method, payload, charset,
9292

9393
#### RSA-PSS support
9494

95-
This library signs requests using OAuth 1.0a `RSA-SHA256`.
95+
This library signs requests using OAuth 1.0a with an RSA + SHA-256 digest.
9696

97-
* Default: the signature uses the JCA algorithm `SHA256withRSA` (RSA PKCS#1 v1.5).
98-
* Fallback: on some runtimes/providers, `SHA256withRSA` may not be available while RSA-PSS is.
99-
In that case, this library automatically falls back to the JCA algorithm `RSASSA-PSS` using
97+
* When the runtime/provider supports the JCA algorithm `SHA256withRSA`, the library uses it (RSA PKCS#1 v1.5).
98+
In this case, the Authorization header contains `oauth_signature_method="RSA-SHA256"`.
99+
* If `SHA256withRSA` is not usable and RSA-PSS is, the library falls back to the JCA algorithm `RSASSA-PSS` using
100100
`SHA-256 / MGF1(SHA-256) / saltLen=32 / trailerField=1`.
101+
In this case, the Authorization header contains `oauth_signature_method="RSA-PSS"`.
101102

102103
Notes:
103104
* The RSA signature scheme (PKCS#1 v1.5 vs PSS) cannot be inferred from an RSA `PrivateKey`.
104-
The fallback is based on provider capabilities.
105-
* If you want to know which algorithm will be used on the current runtime/provider, you can call:
105+
The selection is based on provider capabilities.
106+
* If you want to know which JCA algorithm will be used on the current runtime/provider, you can call:
106107

107108
```java
108109
String alg = OAuth.signSignatureBaseStringAlgName("baseString", signingKey, StandardCharsets.UTF_8);

0 commit comments

Comments
 (0)