Skip to content

Commit 2712bbd

Browse files
[Java][jersey2] Improve http signature code comments (#6463)
* Mustache template should use invokerPackage tag to generate import * fix typo and improve code comments
1 parent ec39005 commit 2712bbd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

modules/openapi-generator/src/main/resources/Java/libraries/jersey2/auth/HttpSignatureAuth.mustache

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public class HttpSignatureAuth implements Authentication {
181181
/**
182182
* Returns the signer instance used to sign HTTP messages.
183183
*
184-
* @returrn the signer instance.
184+
* @return the signer instance.
185185
*/
186186
public Signer getSigner() {
187187
return signer;
@@ -200,12 +200,14 @@ public class HttpSignatureAuth implements Authentication {
200200
* Set the private key used to sign HTTP requests using the HTTP signature scheme.
201201
*
202202
* @param key The private key.
203+
*
204+
* @throws InvalidKeyException Unable to parse the key, or the security provider for this key
205+
* is not installed.
203206
*/
204-
public void setPrivateKey(Key key) throws ApiException {
207+
public void setPrivateKey(Key key) throws InvalidKeyException {
205208
if (key == null) {
206209
throw new ApiException("Private key (java.security.Key) cannot be null");
207210
}
208-
209211
signer = new Signer(key, new Signature(keyId, signingAlgorithm, algorithm, parameterSpec, null, headers));
210212
}
211213

0 commit comments

Comments
 (0)