Skip to content

Commit

Permalink
Merge pull request #106 from TAMULib/2.x-token-provider-referrer-corr…
Browse files Browse the repository at this point in the history
…ection

Correct referrer typo, patch version
  • Loading branch information
jcreel committed Oct 18, 2019
2 parents 1843472 + 2d7cad0 commit e2adba4
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -36,12 +36,12 @@ public class TokenController {
@RequestMapping("/token")
public RedirectView token(@RequestParam Map<String, String> params, @RequestHeader Map<String, String> headers) throws InvalidKeyException, NoSuchAlgorithmException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, URISyntaxException {
LOG.debug("params: " + params);
String referer = params.get("referer");
if (referer == null) {
LOG.error("No referer in params!!");
throw new RuntimeException("No referer in params!!");
String referrer = params.get("referrer");
if (referrer == null) {
LOG.error("No referrer in params!!");
throw new RuntimeException("No referrer in params!!");
}
URIBuilder builder = new URIBuilder(referer);
URIBuilder builder = new URIBuilder(referrer);
builder.addParameter("jwt", tokenService.craftToken(headers));
String url = builder.build().toASCIIString();
LOG.debug(String.format("Auth url redirect: %s", url));
Expand Down

0 comments on commit e2adba4

Please sign in to comment.