package cn.reghao.oss.console.account.service;

import cn.reghao.oss.console.account.model.dto.AccountLoginDto;
import cn.reghao.oss.console.account.security.form.AccountAuthToken;
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 AccountAuthService extends UserDetailsService {
    AccountAuthToken getPreAuthentication(@Validated AccountLoginDto userLoginDto) throws AuthenticationException;
    AccountAuthToken authByPassword(AccountAuthToken authToken);
    void setCookie(AccountAuthToken authToken, long timeout);
    void clearCookie();
    void logout();
}
