using DigitalData.Core.Abstractions.Security.Key;
using Microsoft.IdentityModel.Tokens;

namespace DigitalData.Core.Abstractions.Security.Services
{
    public interface IJwtSignatureHandler<TPrincipal>
    {
        SecurityToken CreateToken(SecurityTokenDescriptor tokenDescriptor);

        SecurityToken CreateToken(TPrincipal subject, IAsymmetricTokenDescriptor descriptor);

        SecurityToken CreateToken(TPrincipal subject, string issuer, string audience);

        string WriteToken(SecurityToken token);
    }
}