Skip to content

Development #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@
+ Update README documentation
### V1.3.1-SNAPSHOT
+ Update dependency library for jackson-databind to version 2.9.8
+ Update mvn command to pull centralised unit-test cases from github repository
+ Update mvn command to pull centralised unit-test cases from github repository
### V1.3.2-SNAPSHOT
+ Update ApiSigning class to support non-standard http port
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ mvn install
<dependency>
<groupId>com.api.util</groupId>
<artifactId>ApiSecurity</artifactId>
<version>1.3.1-SNAPSHOT</version>
<version>1.3.2-SNAPSHOT</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
id 'com.github.kt3k.coveralls' version '2.6.3'
}

version '1.3.1-SNAPSHOT'
version '1.3.2-SNAPSHOT'

tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
Expand Down
12 changes: 11 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.api.util</groupId>
<artifactId>ApiSecurity</artifactId>
<version>1.3.1-SNAPSHOT</version>
<version>1.3.2-SNAPSHOT</version>
<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -45,6 +45,16 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-plugin</artifactId>
<version>1.8.1</version>
<configuration>
<connectionType>developerConnection</connectionType>
<scmVersion>master</scmVersion>
<scmVersionType>branch</scmVersionType>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
Expand Down
10 changes: 8 additions & 2 deletions src/main/java/com/api/util/ApiSecurity/ApiSigning.java
Original file line number Diff line number Diff line change
Expand Up @@ -453,9 +453,15 @@ public static String getBaseString(String authPrefix
if (!siteUri.getScheme().equals("http") && !siteUri.getScheme().equals("https")) {
throw new ApiUtilException("Support http and https protocol only.");
}


String url = null;
// make sure that the port no and querystring are remove from url
String url = String.format("%s://%s%s", siteUri.getScheme(), siteUri.getHost(), siteUri.getPath());
if(siteUri.getPort()==-1 || siteUri.getPort()==80 || siteUri.getPort()==443){
url = String.format("%s://%s%s", siteUri.getScheme(), siteUri.getHost(), siteUri.getPath());
}else{
url = String.format("%s://%s:%s%s", siteUri.getScheme(), siteUri.getHost(), siteUri.getPort(), siteUri.getPath());
}

log.debug("url:: {}", url);

// helper calss that handle parameters and form fields
Expand Down