Skip to content

Commit

Permalink
bearer token now returns null if the access token is null
Browse files Browse the repository at this point in the history
  • Loading branch information
fsjovatsen committed May 20, 2019
1 parent 99073c3 commit 9de18f4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/no/fint/oauth/TokenService.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ public String getBearerToken() {
}

public String getBearerToken(String requestUrl) {
return String.format(BEARER_TOKEN_TEMPLATE, getAccessToken(requestUrl));
String accessToken = getAccessToken(requestUrl);
if (accessToken != null) {
return String.format(BEARER_TOKEN_TEMPLATE, accessToken);
}
return null;
}
}

0 comments on commit 9de18f4

Please sign in to comment.