task_20993 #1
|
@ -11,10 +11,14 @@ import java.util.Collection;
|
|||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.WebApplicationException;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.ws.rs.core.Response;
|
||||
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
|
@ -30,7 +34,7 @@ import org.gcube.resources.discovery.client.queries.api.SimpleQuery;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
// TODO: Auto-generated Javadoc
|
||||
|
||||
/**
|
||||
* The Class WekeoResolver.
|
||||
*
|
||||
|
@ -57,8 +61,10 @@ public class WekeoResolver {
|
|||
* @return the token
|
||||
* @throws WebApplicationException the web application exception
|
||||
*/
|
||||
@GET
|
||||
@POST
|
||||
@Path("/gettoken")
|
||||
@Consumes(MediaType.TEXT_PLAIN)
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public Response getToken(@Context HttpServletRequest req) throws WebApplicationException{
|
||||
|
||||
logger.info(this.getClass().getSimpleName()+" getToken starts...");
|
||||
|
|
Loading…
Reference in New Issue