package com.dxhy.auth.service;

import java.util.Map;

import com.dxhy.common.vo.JwtAuthenticationRequest;

/**
 * @author jiaohongyang
 */
public interface AuthService {
    /**
     * 根据用户名和密码进行登录
     *
     * @param authenticationRequest
     *            登录信息
     * @return token
     * @throws Exception
     *             异常
     */

    String login(JwtAuthenticationRequest authenticationRequest) throws Exception;

    /**
     * 根据用户名和密码进行登录
     *
     * @param authenticationRequest
     *            登录信息
     * @return token
     * @throws Exception
     *             异常
     */

    Map<String, String> casLogin(JwtAuthenticationRequest authenticationRequest) throws Exception;

    /**
     * 刷新
     *
     * @param oldToken
     *            token
     * @return token
     * @throws Exception
     *             异常
     */
    String refresh(String oldToken) throws Exception;

    /**
     * token
     *
     * @param token
     *            token
     * @throws Exception
     *             异常
     */
    void validate(String token) throws Exception;
}
