/// <summary>
 /// Initializes a new instance of <see cref="ApiTokenHandler"/>.
 /// </summary>
 /// <inheritdoc />
 public ApiTokenHandler(
     IOptionsMonitor <ApiTokenOptions> options,
     ILoggerFactory logger,
     UrlEncoder encoder,
     ISystemClock clock,
     IApiTokenValidator tokenValidator) : base(options, logger, encoder, clock)
 {
     _tokenValidator = tokenValidator;
 }
Example #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="port">http port fir queue listener</param>
 /// <param name="tokenValidator">token validation, if specified, queue will require client to send a valid token</param>
 /// <param name="persistenceAdapter">persistance adapter, queue will persist messages if thie argument is specified</param>
 /// <param name="maxMessageSize">message size in bytes, override if you need to restrict message size</param>
 public QueueHost(int port, IApiTokenValidator tokenValidator = null, IPersistenceAdapter persistenceAdapter = null,
                  int maxMessageSize = 65536)
 {
     _persistenceAdapter = persistenceAdapter;
     _maxMessageSize     = maxMessageSize;
     _tokenValidator     = tokenValidator;
     _port = port;
     ConfigureAuthentication();
     ConfigurePersistance();
 }