package com.app.admin.framework.system.permission.authorization.log;

import com.app.admin.framework.system.permission.authorization.controller.AuthController;
import com.app.framework.core.log.intercept.LogInterceptSupport;
import com.app.framework.core.log.result.LogResult;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
 * 用户认证日志记录器
 */
@Component
public class AuthLogIntercept extends LogInterceptSupport<AuthController> {

	/**
     * 用户登录
     */
	public LogResult login(HttpServletRequest request, String username, String password) {
		LogResult result = new LogResult();
		result.setOperType("登录");
		return result;
	}

	/**
	 * 用户登录
	 */
	public LogResult loginByShiro(HttpServletRequest request, String username, String password, String online) {
		return this.login(request, username, password);
	}

	/**
	 * 退出登录
	 */
	public LogResult logout(HttpServletRequest request, HttpServletResponse response) {
		LogResult result = new LogResult();
		result.setOperType("退出登录");
		return result;
	}
}
