- 将 file 相关端点命名空间从小写改为首字母大写 - 将 im 相关端点命名空间从小写改为首字母大写 - 将 workflow 相关端点命名空间从小写改为首字母大写 - 将 rag 相关端点命名空间从小写改为首字母大写 - 将 platform 相关端点命名空间从小写改为首字母大写 - 保持代码功能不变,仅调整命名空间命名风格一致性
26 lines
663 B
C#
26 lines
663 B
C#
using BuildFlow.Platform.Application.Auth.Commands;
|
|
using BuildFlow.Platform.Application.Auth.DTOs;
|
|
using MediatR;
|
|
|
|
namespace BuildFlow.Host.Endpoints.Platform.Auth;
|
|
|
|
|
|
/// <summary>
|
|
/// 吊销令牌端点。
|
|
/// </summary>
|
|
public class RevokeTokenEndpoint(IMediator mediator) : Endpoint<RevokeTokenRequest>
|
|
{
|
|
public override void Configure()
|
|
{
|
|
Post("/auth/revoke");
|
|
}
|
|
|
|
public override async Task HandleAsync(RevokeTokenRequest req, CancellationToken ct)
|
|
{
|
|
await mediator.Send(new RevokeTokenCommand(req.RefreshToken), ct);
|
|
await Send.OkAsync(true, ct);
|
|
}
|
|
}
|
|
|
|
/// <summary>吊销刷新令牌请求校验。</summary>
|