duration = Long.parseLong(durationParameter);
}
if (portalTokenId == null) {
error("Token given by portal is invalid.");
GeneralException ge = new GeneralException("Error: The token presented by portal is null.");
request.setAttribute("exception", ge);
JSPUtil.fwd(request, response, configurationReader.getErrorUrl());
return;
}
info("Gateway name " + gatewayName);
info("Portal user name " + portalUserName);
info("Community user contact email " + contactEmail);
info("Token id presented " + portalTokenId);
info("2.a. Getting token and verifier.");
String token = request.getParameter(TOKEN_KEY);
String verifier = request.getParameter(VERIFIER_KEY);
if (token == null || verifier == null) {
warn("2.a. The token is " + (token == null ? "null" : token) + " and the verifier is "
+ (verifier == null ? "null" : verifier));
GeneralException ge = new GeneralException(
"Error: This servlet requires parameters for the token and verifier. It cannot be called directly.");
request.setAttribute("exception", ge);
JSPUtil.fwd(request, response, configurationReader.getErrorUrl());
return;
}