45 lines
929 B
C#
45 lines
929 B
C#
using Refit;
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Runtime.InteropServices;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace CloudGaming.Core.AgileConfig
|
|
{
|
|
/// <summary>
|
|
/// IAgileConfigClient
|
|
/// </summary>
|
|
public interface IAuthClient
|
|
{
|
|
// 定义登录接口
|
|
[Post("/admin/jwt/login")]
|
|
Task<LoginResponse> LoginAsync([Body] LoginRequest loginRequest);
|
|
}
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public class LoginRequest
|
|
{
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public string UserName { get; set; }
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public string Password { get; set; }
|
|
}
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public class LoginResponse
|
|
{
|
|
public string Token { get; set; } // 登录成功后返回的 JWT 令牌
|
|
}
|
|
}
|