Skip to content

Commit

Permalink
Merge branch 'hotfix/remove-refresh-token-validation'
Browse files Browse the repository at this point in the history
* hotfix/remove-refresh-token-validation:
  Use newer OpenJDK version for tests
  Harmonize indentation
  Remove legacy refresh token validation
  • Loading branch information
Martin Domke committed Sep 11, 2019
2 parents 5a7a4de + 99df487 commit 143483f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ dist: trusty
language: java
jdk:
- oraclejdk8
- openjdk7
- openjdk12
install: mvn install -Dgpg.skip=true -DskipTests=true -Dmaven.javadoc.skip=true -B
-V
script: mvn test
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/me/figo/FigoConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,6 @@ public TokenResponse convertAuthenticationCode(String authenticationCode) throws
* @exception IOException IOException
*/
public TokenResponse convertRefreshToken(String refreshToken) throws IOException, FigoException {
if (!refreshToken.startsWith("R")) {
throw new FigoException("invalid_code", "Invalid authentication code");
}

return this.queryApi("/auth/token", new TokenRequest(refreshToken, null, this.redirectUri, "refresh_token"), "POST", TokenResponse.class);
}

Expand Down
24 changes: 12 additions & 12 deletions src/main/java/me/figo/internal/TokenResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ public class TokenResponse {
public String access_token;

@Expose
public String refresh_token;
public String refresh_token;

@Expose
@Expose
public Integer expires_in;

public String getAccessToken() {
return access_token;
}

public String getRefreshToken() {
return refresh_token;
}
public String getAccessToken() {
return access_token;
}

public String getRefreshToken() {
return refresh_token;
}

public Integer getExpiresIn() {
return expires_in;
}
public Integer getExpiresIn() {
return expires_in;
}
}

0 comments on commit 143483f

Please sign in to comment.