Exemplo n.º 1
0
 public BaseService(IAuthRepository authRepository, ITokenController tokenController,
                    ILogRepository logRepository, IOptions <AuthOptions> authOptions)
 {
     AuthRepository  = authRepository ?? throw new ArgumentNullException(nameof(authRepository));
     TokenController = tokenController ?? throw new ArgumentNullException(nameof(tokenController));
     LogRepository   = logRepository ?? throw new ArgumentNullException(nameof(logRepository));
     AuthOptions     = authOptions.Value;
 }
Exemplo n.º 2
0
 /// <inheritdoc />
 public AdminService(IAuthRepository authRepository, ITokenController tokenController, ILogRepository logRepository, IOptions <AuthOptions> authOptions)
     : base(authRepository, tokenController, logRepository, authOptions)
 {
 }
Exemplo n.º 3
0
 /// <summary>
 /// Create a new <see cref="AuthApi"/>.
 /// </summary>
 /// <param name="users">The repository used to check if the user exists.</param>
 /// <param name="token">The token generator.</param>
 /// <param name="permissions">The permission opitons.</param>
 public AuthApi(IUserRepository users, ITokenController token, IOptionsMonitor <PermissionOption> permissions)
 {
     _users       = users;
     _token       = token;
     _permissions = permissions;
 }