using AutoMapper; using DigitalData.Core.Security.Config; using Microsoft.IdentityModel.Tokens; namespace DigitalData.Core.Security { public class TokenDescriptorProvider { private readonly IMapper _mapper; public TokenDescriptorProvider(IMapper mapper) { _mapper = mapper; } public SecurityTokenDescriptor Create(TokenDescription description) => _mapper.Map(description, new SecurityTokenDescriptor()); } }