no usage of DefaultProfileService
This commit is contained in:
@ -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 =>
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user