package com.microstar.tap3;

import javax.ws.rs.Consumes;
import javax.ws.rs.DefaultValue;
import javax.ws.rs.HEAD;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

import com.microstar.tap3.login.api.LoginData;

public interface LoginResource
{

	//
	// Implement @GET, @POST, @PUT and @DELETE as needed here.
	/*
	 * Returns nothing; just serves to keep the Lambda warm.
	 * <p>
	 * This method always returns immediately with an 200 OK status and no body.
	 * 
	 * @return	200 OK status with no body.
	 */
	@HEAD
	@Path("/ping")
	public Response ping(@QueryParam("additionalDelay") @DefaultValue("0") int additionalDelay);

	@POST
	@Consumes({MediaType.APPLICATION_JSON})
	@Produces({MediaType.APPLICATION_JSON})
	public Response doLogin(LoginData ld);
	
	@PUT
	@Path("/{id}")
	@Consumes({MediaType.APPLICATION_JSON})
	@Produces({MediaType.APPLICATION_JSON})
	public Response changePassword(@PathParam("id") String id, LoginData ld);

}
