Skip to content

Commit c26f4e8

Browse files
authored
Merge pull request #4 from GovTechSG/development
Snapshot Version 1.1.1 Update
2 parents 907fe5f + 748bea4 commit c26f4e8

File tree

7 files changed

+46
-18
lines changed

7 files changed

+46
-18
lines changed

CONTRIBUTING.md renamed to .github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Contributing:
1+
## Contributing
22
We welcome your involvement, be it fixing bugs or implementing new features that you find relevant to this library.
33

44
To contribute, you may follow the steps below:
File renamed without changes.

PULL_REQUEST_TEMPLATE.md renamed to .github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ Please delete options that are not relevant.
1212
- [ ] New feature (non-breaking change which adds functionality)
1313
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
1414
- [ ] This change requires a documentation update
15+
- [ ] Code enhancement and update (non-breaking change)
16+
- [ ] Security patch
1517

16-
# How Has This Been Tested?
18+
## How Has This Been Tested?
1719

1820
Please describe or list the test cases that you ran to verify your changes, and provide instructions so we can reproduce.
1921

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,8 @@
1010
+ Update interface name so as be intuitive
1111
+ Update corresponding test cases
1212
+ Include Issue/PR templates
13-
+ Include Contribution template
13+
+ Include Contribution template
14+
### V1.1.1-SNAPSHOT
15+
+ Minor refactoring
16+
+ Update documentation
17+
+ Update templates

README.md

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,36 @@
55

66
A java helper utilities that form HTTP security header for authentication and verification
77

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+
826
## Getting Started
927
Include this helper class in your java project to perform API Security operations
1028

1129
This project use Maven or Gradle as its build and management tools
1230

31+
1332
### Maven Guide
1433

1534
+ Download and Install Maven (3.5.0 or above)
1635
+ Java (1.8)
1736

18-
#### Build
37+
#### Maven Build Option
1938

2039
**Option 1:** Compile and package into JAR
2140

@@ -76,14 +95,14 @@ As some of the test cases contains UTF-8 characters, you have to set following p
7695
export GRADLE_OPTS="-Dfile.encoding=utf-8"
7796
```
7897

79-
#### Build
98+
#### Gradle Build Option
8099
**Option 1:** Compile and package into JAR
81100

82101
```bash
83102
gradle clean build
84103
```
85104

86-
#### Test
105+
#### Gradle Test
87106
To test with Jacoco and publish a html report
88107

89108
```bash
@@ -111,9 +130,9 @@ dependencies {
111130
112131
```
113132

114-
#### Development
133+
### Development
115134

116-
##### Preparing Signature BaseString :
135+
#### Constructing Signature BaseString
117136

118137
Method:
119138
* getBaseString
@@ -156,7 +175,7 @@ System.out.println(baseString);
156175

157176
```
158177

159-
##### Preparing HMACSHA256 L1 Security Signature :
178+
#### Constructing HMAC256 L1 Header
160179

161180
Method:
162181
* getHMACSignature
@@ -180,7 +199,7 @@ try {
180199

181200
```
182201

183-
##### Preparing RSA256 L2 Security Signature :
202+
#### Constructing RSA256 L2 Header
184203

185204
Method:
186205
* getRSASignature
@@ -213,7 +232,7 @@ try {
213232

214233
```
215234

216-
##### Preparing HTTP Signature Token :
235+
#### Preparing HTTP Signature Token
217236

218237
Append this signature token into the Authorization header of the HTTP request
219238

@@ -250,13 +269,16 @@ try {
250269
}
251270
```
252271

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).
255277

256-
### Release
257-
+ See [CHANGELOG.md](CHANGELOG.md).
278+
## License
279+
[MIT LICENSE](LICENSE).
258280

259-
### Reference:
281+
## References
260282
+ [UTF-8 in Gradle](https://stackoverflow.com/questions/21267234/show-utf-8-text-properly-in-gradle)
261283
+ [SLF4J FAQ](https://www.slf4j.org/faq.html)
262284
+ [Akana API Consumer Security](http://docs.akana.com/ag/cm_policies/using_api_consumer_app_sec_policy.htm)

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
id 'com.github.kt3k.coveralls' version '2.6.3'
55
}
66

7-
version '1.1.0-SNAPSHOT'
7+
version '1.1.1-SNAPSHOT'
88

99
tasks.withType(JavaCompile) {
1010
options.encoding = "UTF-8"

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<modelVersion>4.0.0</modelVersion>
33
<groupId>com.api.util</groupId>
44
<artifactId>ApiSecurity</artifactId>
5-
<version>1.1.0-SNAPSHOT</version>
5+
<version>1.1.1-SNAPSHOT</version>
66
<build>
77
<plugins>
88
<plugin>

0 commit comments

Comments
 (0)