IAuthenticationService.cs 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. using Microsoft.AspNetCore.Http;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Security.Claims;
  5. using System.Text;
  6. namespace GreenTree.Maschinenbestellungen.Services.Authentication
  7. {
  8. public interface IAuthenticationService
  9. {
  10. /// <summary>
  11. /// Authenticate and sign user in
  12. /// </summary>
  13. /// <param name="httpContext"></param>
  14. /// <param name="username">The username.</param>
  15. /// <param name="isPersistent">The login persistence.</param>
  16. public void SignIn(string username, bool isPersistent = false);
  17. /// <summary>
  18. /// Authenticate and sign user in
  19. /// </summary>
  20. /// <param name="httpContext"></param>
  21. /// <param name="username">The username.</param>
  22. /// <param name="isPersistent">The login persistence.</param>
  23. public void SignInAdmin(bool isPersistent = false);
  24. /// <summary>
  25. /// Sign user out
  26. /// </summary>
  27. /// <param name="httpContext"></param>
  28. public void SignOut();
  29. }
  30. }