kreta/Kreta.BusinessLogic/Helpers/KirAuthenticationHelper.cs
2024-03-13 00:33:46 +01:00

25 lines
827 B
C#

using System;
using Kreta.Core.KIR.Domain.Model;
using Kreta.Core.KIR.Factory.Interface;
using Kreta.Core.KIR.Service.Interface;
namespace Kreta.BusinessLogic.Helpers
{
public class KirAuthenticationHelper
{
private IAuthenticationService AuthenticationService { get; }
public KirAuthenticationHelper(IAuthenticationServiceFactory authenticationServiceFactory)
{
if (authenticationServiceFactory == null)
{
throw new ArgumentNullException(nameof(authenticationServiceFactory));
}
AuthenticationService = authenticationServiceFactory.GetAuthenticationService();
}
public AuthHeaderModel Authenticate(AuthHeaderModel authHeaderModel)
=> AuthenticationService.Authenticate(authHeaderModel);
}
}