smolnar82 commented on a change in pull request #443:
URL: https://github.com/apache/knox/pull/443#discussion_r625323200
##########
File path:
gateway-applications/src/main/resources/applications/tokengen/app/js/tokengen.js
##########
@@ -53,20 +53,23 @@ function b64DecodeUnicode(str) {
}
var gen = function() {
+ $('#invalidLifetimeText').hide();
var pathname = window.location.pathname;
var topologyContext = pathname.replace(loginPageSuffix, "");;
var baseURL = topologyContext.substring(0,
topologyContext.lastIndexOf('/'));
baseURL = baseURL.substring(0, baseURL.lastIndexOf('/') + 1);
var tokenURL = topologyContext + knoxtokenURL;
var form = document.forms[0];
//var comment = form.comment.value;
- var lifespan = form.lifespan.value;
+ var lt_days = form.lt_days.value;
+ var lt_hours = form.lt_hours.value;
+ var lt_mins = form.lt_mins.value;
var _gen = function() {
var apiUrl = tokenURL;
//Instantiate HTTP Request
- var params = '';
- if (lifespan != '') {
- params = '?lifespan=' + lifespan;
+ var params = '?lifespan=P' + lt_days + "DT" + lt_hours + "H" + lt_mins
+ "M"; //we need to support Java's Duration pattern
Review comment:
@lmccay - I'm going to merge this change as-is, if you want we can open
a follow-up JIRA with a different `queryParam` language later.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]