Skip to content

Commit

Permalink
[Java][jersey2] Improve http signature code comments (#6463)
Browse files Browse the repository at this point in the history
* Mustache template should use invokerPackage tag to generate import

* fix typo and improve code comments
  • Loading branch information
sebastien-rosset authored May 28, 2020
1 parent ec39005 commit 2712bbd
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public class HttpSignatureAuth implements Authentication {
/**
* Returns the signer instance used to sign HTTP messages.
*
* @returrn the signer instance.
* @return the signer instance.
*/
public Signer getSigner() {
return signer;
Expand All @@ -200,12 +200,14 @@ public class HttpSignatureAuth implements Authentication {
* Set the private key used to sign HTTP requests using the HTTP signature scheme.
*
* @param key The private key.
*
* @throws InvalidKeyException Unable to parse the key, or the security provider for this key
* is not installed.
*/
public void setPrivateKey(Key key) throws ApiException {
public void setPrivateKey(Key key) throws InvalidKeyException {
if (key == null) {
throw new ApiException("Private key (java.security.Key) cannot be null");
}

signer = new Signer(key, new Signature(keyId, signingAlgorithm, algorithm, parameterSpec, null, headers));
}

Expand Down

0 comments on commit 2712bbd

Please sign in to comment.