1
This commit is contained in:
31
Gatedge.ScanCode/Services/AccountService.cs
Normal file
31
Gatedge.ScanCode/Services/AccountService.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using Gatedge.K3Cloud.Utils.Model.K3Request;
|
||||
using Gatedge.ScanCode.Services.IServices;
|
||||
using Gatedge.ScanCode.Utils;
|
||||
|
||||
namespace Gatedge.ScanCode.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// AccountService - 账号服务
|
||||
/// </summary>
|
||||
public class AccountService : IAccountService
|
||||
{
|
||||
private readonly JwtUtils _jwtUtils;
|
||||
/// <summary>
|
||||
/// 注入Jwt
|
||||
/// </summary>
|
||||
/// <param name="jwtUtils"></param>
|
||||
public AccountService(JwtUtils jwtUtils)
|
||||
{
|
||||
_jwtUtils = jwtUtils;
|
||||
}
|
||||
/// <summary>
|
||||
/// 登录
|
||||
/// </summary>
|
||||
/// <param name="loginInfo"></param>
|
||||
/// <returns></returns>
|
||||
public string Login(LoginInfo loginInfo)
|
||||
{
|
||||
return _jwtUtils.CreateToken(loginInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user