1234567891011121314151617181920212223242526 |
- using IdentityServer4.Models;
- using IdentityServer4.Services;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Threading.Tasks;
- namespace QM.AuthServer.Auth
- {
- public class ProfileService : IProfileService
- {
- public async Task GetProfileDataAsync(ProfileDataRequestContext context)
- {
- var claims = context.Subject.Claims.ToList();
- context.IssuedClaims = claims.ToList();
- //foreach (var item in claims)
- //{
- // context.Client.Claims.Add(new ClientClaim(item.Type, item.Value));
- //}
- }
- public async Task IsActiveAsync(IsActiveContext context)
- {
- context.IsActive = true;
- }
- }
- }
|