package org.iri_research.renkan.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
@RequestMapping("/auth")
public class AuthController {

    @SuppressWarnings("unused")
    private final Logger logger = LoggerFactory.getLogger(AuthController.class);

    @RequestMapping(value = "/login", method = RequestMethod.GET, produces = { "text/html;charset=UTF-8" })
    public String login() {
        return "auth/login";
    }

    @RequestMapping(value = "/loginfailed", method = RequestMethod.GET, produces = { "text/html;charset=UTF-8" })
    public String loginFailed(Model model) {

        model.addAttribute("login_error", true);
        return "auth/login";
    }

}
