package cn.reghao.devops.mgr.admin.service;

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