-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When retry flag is set, the hmac is generated based on the previous n…
…once, but the hmac has to be regenerated since the date changes
- Loading branch information
Gabriel Rusu
committed
Aug 24, 2017
1 parent
c5a8ca8
commit 1da452b
Showing
3 changed files
with
17 additions
and
97 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
# Modulr Finance HMAC | ||
|
||
### [ModulrAuthHeaderExample.java] (https://github.com/Modulr-finance/modulr-hmac/blob/master/ModulrAuthHeaderExample.java) | ||
This class provides a Java example of generating HMAC Signature headers for use with Modulr API calls. | ||
### Samples | ||
Samples directory contain sample code for the following languages: | ||
- Java | ||
|
||
### [io.swagger.client.auth.ApiKeyAuth.java] (https://github.com/Modulr-finance/modulr-hmac/blob/master/io/swagger/client/auth/ApiKeyAuth.java) | ||
This class provides a drop in replacement for the same file generated from Swagger.io Java client generation. This assumes you set ApiKey to your Modulr issued API Key and ApiKeyPrefix to your Modulr issued API secret in io.swagger.client.Configuration. For example; | ||
|
||
```java | ||
public static void main(String[] args) throws ApiException { | ||
Configuration.getDefaultApiClient().setApiKey("<Your API Key>"); | ||
Configuration.getDefaultApiClient().setApiKeyPrefix("<You API Secret>"); | ||
TransactionsApi api = new TransactionsApi(); | ||
System.out.println(api.getTransactionsUsingGET("A02017NU",0,25)); | ||
class ModulrApiAuth { | ||
public static void main(String[] args) throws ApiException { | ||
Configuration.getDefaultApiClient().setApiKey("<Your API Key>"); | ||
Configuration.getDefaultApiClient().setApiKeyPrefix("<You API Secret>"); | ||
TransactionsApi api = new TransactionsApi(); | ||
System.out.println(api.getTransactionsUsingGET("A02017NU",0,25)); | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters