no usage of DefaultProfileService

This commit is contained in:
Paul Schneider
2025-02-15 20:10:01 +00:00
parent 7612ce1e8b
commit 5cc72cd846
2 changed files with 8 additions and 7 deletions

View File

@ -47,8 +47,8 @@ public static class Config
public static IEnumerable<ApiScope> ApiScopes =>
new ApiScope[]
{
new ApiScope("scope1"),
new ApiScope("scope2"),
new ApiScope("scope1",new string[] {"scope1"}),
new ApiScope("scope2",new string[] {"scope2"}),
};
public static IEnumerable<Client> Clients =>

View File

@ -9,16 +9,17 @@ using Yavsc.Models;
namespace Yavsc.Services
{
public class ProfileService : DefaultProfileService, IProfileService
public class ProfileService : IProfileService
{
private readonly UserManager<ApplicationUser> _userManager;
public ProfileService(
UserManager<ApplicationUser> userManager, ILogger<DefaultProfileService> logger) : base(logger)
UserManager<ApplicationUser> userManager,
ILogger<DefaultProfileService> logger)
{
_userManager = userManager;
}
public async Task<List<Claim>> GetClaimsFromUserAsync(
private async Task<List<Claim>> GetClaimsFromUserAsync(
ProfileDataRequestContext context,
ApplicationUser user)
{
@ -62,7 +63,7 @@ namespace Yavsc.Services
return claims;
}
override public async Task GetProfileDataAsync(ProfileDataRequestContext context)
public async Task GetProfileDataAsync(ProfileDataRequestContext context)
{
var subjectId = GetSubjectId(context.Subject);
if (subjectId==null) return;
@ -71,7 +72,7 @@ namespace Yavsc.Services
context.IssuedClaims = await GetClaimsFromUserAsync(context, user);
}
override public async Task IsActiveAsync(IsActiveContext context)
public async Task IsActiveAsync(IsActiveContext context)
{
string? subjectId = GetSubjectId(context.Subject);
if (subjectId == null)