nlphub/src/main/java/org/gcube/data/analysis/nlphub/session/SessionUtils.java

23 lines
463 B
Java

package org.gcube.data.analysis.nlphub.session;
import javax.servlet.http.HttpServletRequest;
import org.gcube.data.analysis.nlphub.legacy.Constants;
public class SessionUtils {
public static String getToken(HttpServletRequest request) {
String token = request.getParameter(Constants.TOKEN_PARAMETER);
if(token == null || token.isEmpty()){
if(Constants.DEBUG){
token = Constants.DEFAULT_TOKEN;
} else {
}
}
return token;
}
}