feat: complete SaaS commercial delivery workflows
This commit is contained in:
@@ -18,6 +18,7 @@ namespace Tiku.Api.Controllers;
|
||||
[Produces("application/json")]
|
||||
public sealed class AuthController(
|
||||
IAuthService authService,
|
||||
IOwnerActivationService ownerActivationService,
|
||||
ISmsVerificationService smsVerificationService,
|
||||
IAuthSessionStore sessionStore,
|
||||
ITenantContext tenantContext,
|
||||
@@ -26,6 +27,22 @@ public sealed class AuthController(
|
||||
ICurrentUser currentUser,
|
||||
IOptions<TenantResolutionOptions> tenantResolutionOptions) : ControllerBase
|
||||
{
|
||||
[AllowAnonymous]
|
||||
[EnableRateLimiting(AuthRateLimitPolicies.Password)]
|
||||
[HttpPost("activation/complete")]
|
||||
[EndpointSummary("完成租户负责人一次性激活")]
|
||||
[EndpointDescription("使用平台开通时签发的一次性令牌设置初始密码;令牌仅可消费一次。")]
|
||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||
[ProducesResponseType<ProblemDetails>(StatusCodes.Status400BadRequest)]
|
||||
[ProducesResponseType<ProblemDetails>(StatusCodes.Status409Conflict)]
|
||||
public async Task<IActionResult> CompleteOwnerActivation(
|
||||
CompleteOwnerActivationDto request,
|
||||
CancellationToken cancellationToken)
|
||||
{
|
||||
await ownerActivationService.CompleteAsync(request.ToRequest(), cancellationToken);
|
||||
return NoContent();
|
||||
}
|
||||
|
||||
[AllowAnonymous]
|
||||
[EnableRateLimiting(AuthRateLimitPolicies.Sms)]
|
||||
[HttpPost("sms/send")]
|
||||
|
||||
Reference in New Issue
Block a user