no usage of DefaultProfileService

main
Paul Schneider 10 months ago
parent 7612ce1e8b
commit 5cc72cd846
2 changed files with 8 additions and 7 deletions

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

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

Loading…