package cn.reghao.bnt.web.admin.service;

import cn.reghao.bnt.web.admin.security.form.AccountAuthToken;
import cn.reghao.bnt.web.admin.model.dto.AccountLoginDto;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.validation.annotation.Validated;

/**
 * @author reghao
 * @date 2021-11-14 14:51:17
 */
public interface AccountLoginService extends UserDetailsService {
    AccountAuthToken getPreAuthentication(@Validated AccountLoginDto accountLoginDto) throws AuthenticationException;
    AccountAuthToken authByPassword(AccountAuthToken authToken);
    void setCookie(AccountAuthToken authToken, long timeout);
    void clearCookie();
    void logout();
}
