All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.refine.commands.GetCSRFTokenCommand Maven / Gradle / Ivy

Go to download

OpenRefine is a free, open source power tool for working with messy data and improving it

There is a newer version: 3.8.2
Show newest version

package com.google.refine.commands;

import java.io.IOException;
import java.util.Collections;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Generates a fresh CSRF token.
 */
public class GetCSRFTokenCommand extends Command {

    @Override
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        respondJSON(response, Collections.singletonMap("token", csrfFactory.getFreshToken()));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy