5
5
6
6
A java helper utilities that form HTTP security header for authentication and verification
7
7
8
+ ## Table of Contents
9
+ - [ Getting Started] ( #getting-started )
10
+ * [ Using Maven] ( #maven-guide )
11
+ + [ Maven Build Option] ( #maven-build-option )
12
+ * [ Using Gradle] ( #gradle-guide )
13
+ + [ Preparation] ( #preparation )
14
+ + [ Gradle Build Option] ( #gradle-build-option )
15
+ + [ Gradle Test] ( #gradle-test )
16
+ * [ Development] ( #development )
17
+ + [ Constructing Signature BaseString] ( #constructing-signature-basestring )
18
+ + [ Constructing HMAC256 L1 Header] ( #constructing-hmac256-l1-header )
19
+ + [ Constructing RSA256 L2 Header] ( #constructing-rsa256-l2-header )
20
+ + [ Preparing HTTP Signature Token] ( #preparing-http-signature-token )
21
+ - [ Release] ( #release )
22
+ - [ Contributing] ( #contributing )
23
+ - [ License] ( #license )
24
+ - [ References] ( #references )
25
+
8
26
## Getting Started
9
27
Include this helper class in your java project to perform API Security operations
10
28
11
29
This project use Maven or Gradle as its build and management tools
12
30
31
+
13
32
### Maven Guide
14
33
15
34
+ Download and Install Maven (3.5.0 or above)
16
35
+ Java (1.8)
17
36
18
- #### Build
37
+ #### Maven Build Option
19
38
20
39
** Option 1:** Compile and package into JAR
21
40
@@ -76,14 +95,14 @@ As some of the test cases contains UTF-8 characters, you have to set following p
76
95
export GRADLE_OPTS=" -Dfile.encoding=utf-8"
77
96
```
78
97
79
- #### Build
98
+ #### Gradle Build Option
80
99
** Option 1:** Compile and package into JAR
81
100
82
101
``` bash
83
102
gradle clean build
84
103
```
85
104
86
- #### Test
105
+ #### Gradle Test
87
106
To test with Jacoco and publish a html report
88
107
89
108
``` bash
@@ -111,9 +130,9 @@ dependencies {
111
130
112
131
```
113
132
114
- #### Development
133
+ ### Development
115
134
116
- ##### Preparing Signature BaseString :
135
+ #### Constructing Signature BaseString
117
136
118
137
Method:
119
138
* getBaseString
@@ -156,7 +175,7 @@ System.out.println(baseString);
156
175
157
176
```
158
177
159
- ##### Preparing HMACSHA256 L1 Security Signature :
178
+ #### Constructing HMAC256 L1 Header
160
179
161
180
Method:
162
181
* getHMACSignature
@@ -180,7 +199,7 @@ try {
180
199
181
200
```
182
201
183
- ##### Preparing RSA256 L2 Security Signature :
202
+ #### Constructing RSA256 L2 Header
184
203
185
204
Method:
186
205
* getRSASignature
@@ -213,7 +232,7 @@ try {
213
232
214
233
```
215
234
216
- ##### Preparing HTTP Signature Token :
235
+ #### Preparing HTTP Signature Token
217
236
218
237
Append this signature token into the Authorization header of the HTTP request
219
238
@@ -250,13 +269,16 @@ try {
250
269
}
251
270
```
252
271
253
- ### Contributing
254
- + For more information about contributing PRs and issues, see [ CONTRIBUTING.md] ( CONTRIBUTING.md ) .
272
+ ## Contributing
273
+ For more information about contributing PRs and issues, see [ CONTRIBUTING.md] ( .github/CONTRIBUTING.md ) .
274
+
275
+ ## Release
276
+ See [ CHANGELOG.md] ( CHANGELOG.md ) .
255
277
256
- ### Release
257
- + See [ CHANGELOG.md ] ( CHANGELOG.md ) .
278
+ ## License
279
+ [ MIT LICENSE ] ( LICENSE ) .
258
280
259
- ### Reference:
281
+ ## References
260
282
+ [ UTF-8 in Gradle] ( https://stackoverflow.com/questions/21267234/show-utf-8-text-properly-in-gradle )
261
283
+ [ SLF4J FAQ] ( https://www.slf4j.org/faq.html )
262
284
+ [ Akana API Consumer Security] ( http://docs.akana.com/ag/cm_policies/using_api_consumer_app_sec_policy.htm )
0 commit comments