IAuthorizationService.cs 563 B

123456789101112131415161718
  1. using Microsoft.AspNetCore.Authorization;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Security.Principal;
  5. using System.Text;
  6. namespace GreenTree.Strohrmann.ERP.Services.Authorization
  7. {
  8. public interface IAuthorizationService
  9. {
  10. /// <summary>
  11. /// Check wether the user has a specific policy
  12. /// </summary>
  13. /// <param name="identity">The user identity.</param>
  14. /// <param name="policy">The policy to be checked.</param>
  15. public bool UserHasPolicy(IIdentity identity, string policy);
  16. }
  17. }