public void Build(IPangulAuthService authService) { if (!(authService is IAuthServiceConfiguration configurable)) { throw new Exception("IAuthService implementations must implement IAuthServiceConfiguration"); } if (configurable.IsConfigured) { throw new Exception("IAuthService implementation is already configured"); } configurable.Configure(_providers); }
public AuthControllerService(IPangulAuthService pangulAuthService, IAuthService auth) { _auth = auth; _pangulAuthService = pangulAuthService; _settings = new ServiceSettings(); }
public AuthController(IAuthService auth, IPangulAuthService pangulAuthService) { _auth = auth; _logger = LogManager.GetCurrentClassLogger(); _service = new AuthControllerService(pangulAuthService, auth); }