OpenAuth.Net/Infrastructure/Auth/IAuthenticationService.cs

32 lines
932 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Infrastructure.Auth
{
/// <summary>
/// 用于身份认证接口
/// </summary>
public interface IAuthenticationService
{
/// <summary>
/// 登录
/// </summary>
/// <param name="loginName">登录名</param>
/// <param name="userData">与登录名相关的用户信息</param>
/// <param name="expiration">登录Cookie的过期时间单位分钟。</param>
void SignIn(string loginName, dynamic userInfo, TimeSpan expiration);
/// <summary>
/// 注销
/// </summary>
void SignOut();
/// <summary>
/// 获取当前登录的用户
/// </summary>
/// <returns>当前用户未通过认证则返回null</returns>
dynamic GetAuthenticatedUser();
}
}