优化导航菜单
This commit is contained in:
1 parent
4360280aee
commit
23fdbf422f
13 files changed
+10595
-19
No files matched your search
@@ -4,6 +4,7 @@ using System.Security.Cryptography;
|
||||
using System.Text.Json;
|
||||
using Jiaowu.Api.Domain.Identity;
|
||||
using Jiaowu.Api.Infrastructure.Auth;
|
||||
using Jiaowu.Api.Infrastructure.Persistence;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
@@ -20,6 +21,7 @@ namespace Jiaowu.Api.Controllers;
|
||||
[ApiController]
|
||||
[Route("api/auth/sso")]
|
||||
public sealed class SsoController(
|
||||
AppDbContext db,
|
||||
UserManager<ApplicationUser> userManager,
|
||||
IAuthSessionService authSessionService,
|
||||
IDistributedCache cache,
|
||||
@@ -269,7 +271,7 @@ public sealed class SsoController(
|
||||
? AuthenticationClientType.App
|
||||
: AuthenticationClientType.Web,
|
||||
cancellationToken);
|
||||
return AuthController.CreateLoginResponse(session);
|
||||
return await AuthController.CreateLoginResponseAsync(db, session, cancellationToken);
|
||||
}
|
||||
|
||||
[AllowAnonymous]
|
||||
@@ -362,7 +364,7 @@ public sealed class SsoController(
|
||||
? AuthenticationClientType.App
|
||||
: AuthenticationClientType.Web,
|
||||
cancellationToken);
|
||||
return AuthController.CreateLoginResponse(session);
|
||||
return await AuthController.CreateLoginResponseAsync(db, session, cancellationToken);
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
|
||||
Reference in new issue
Block a user