public UserTokenStorageService( IUnitOfWork unitOfWork, ISecurityService securityService, IUserTokenFactoryService userTokenFactoryService, IRoleService roleService, IUserRoleService userRoleService, IGroupRoleService groupRoleService, IOptionsSnapshot <SiteSettings> options) { _unitOfWork = unitOfWork; _unitOfWork.CheckArgumentIsNull(nameof(_unitOfWork)); _securityService = securityService; _securityService.CheckArgumentIsNull(nameof(_securityService)); _userTokenFactoryService = userTokenFactoryService; _userTokenFactoryService.CheckArgumentIsNull(nameof(userTokenFactoryService)); _roleService = roleService; _roleService.CheckArgumentIsNull(nameof(roleService)); _userRoleService = userRoleService; _userRoleService.CheckArgumentIsNull(nameof(_userRoleService)); _groupRoleService = groupRoleService; _groupRoleService.CheckArgumentIsNull(nameof(_groupRoleService)); options.CheckArgumentIsNull(nameof(options)); _bearerTokensOptions = options.Value.BearerTokensOptions; _userTokenStorages = _unitOfWork.Set <UserTokenStorage>(); }
public UserTokenFactoryService( ISecurityService securityService, IGroupRoleService groupRoleService, IOptionsSnapshot <SiteSettings> options, ILogger <UserTokenFactoryService> logger) { _securityService = securityService; _securityService.CheckArgumentIsNull(nameof(_securityService)); _groupRoleService = groupRoleService; _groupRoleService.CheckArgumentIsNull(nameof(groupRoleService)); _bearerTokensOptions = options.Value.BearerTokensOptions; _logger = logger; _logger.CheckArgumentIsNull(nameof(logger)); }
public TokenFactory() { configuration = new BearerTokensOptions(); }
public TokenFactoryService(IOptions <SiteSettings> siteSettings, ISecurityService securityService) { _bearerTokensOptions = siteSettings.Value.BearerTokensOptions; _key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(_bearerTokensOptions.Key)); _securityService = securityService; }